better logging when cleaning temp group index

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1443793 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-02-07 23:44:28 +00:00
parent 6da7af1bd2
commit b72d669109
2 changed files with 12 additions and 1 deletions

View File

@ -76,6 +76,16 @@ public class TemporaryGroupIndex
return this; return this;
} }
public String getGroupId()
{
return groupId;
}
public void setGroupId( String groupId )
{
this.groupId = groupId;
}
@Override @Override
public int hashCode() public int hashCode()
{ {

View File

@ -54,12 +54,13 @@ public class TemporaryGroupIndexCleaner
@Scheduled(fixedDelay = 900000) @Scheduled(fixedDelay = 900000)
public void cleanTemporaryIndex() public void cleanTemporaryIndex()
{ {
log.info( "cleanTemporaryIndex" );
for ( TemporaryGroupIndex temporaryGroupIndex : indexMerger.getTemporaryGroupIndexes() ) for ( TemporaryGroupIndex temporaryGroupIndex : indexMerger.getTemporaryGroupIndexes() )
{ {
// cleanup files older than the ttl // cleanup files older than the ttl
if ( new Date().getTime() - temporaryGroupIndex.getCreationTime() > indexMerger.getGroupMergedIndexTtl() ) if ( new Date().getTime() - temporaryGroupIndex.getCreationTime() > indexMerger.getGroupMergedIndexTtl() )
{ {
log.info( "cleanTemporaryIndex for groupId {}", temporaryGroupIndex.getGroupId() );
indexMerger.cleanTemporaryGroupIndex( temporaryGroupIndex ); indexMerger.cleanTemporaryGroupIndex( temporaryGroupIndex );
} }