/**
* Default implementation of a scheduling component for archiva.
*/
-@Service("archivaTaskScheduler#repository")
+@Service( "archivaTaskScheduler#repository" )
public class DefaultRepositoryArchivaTaskScheduler
implements RepositoryArchivaTaskScheduler, ConfigurationListener
{
*
*/
@Inject
- @Named(value = "taskQueue#repository-scanning")
+ @Named( value = "taskQueue#repository-scanning" )
private TaskQueue repositoryScanningQueue;
/**
*
*/
@Inject
- @Named(value = "repositoryStatisticsManager#default")
+ @Named( value = "repositoryStatisticsManager#default" )
private RepositoryStatisticsManager repositoryStatisticsManager;
/**
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings( "unchecked" )
public boolean isProcessingRepositoryTask( String repositoryId )
{
synchronized ( repositoryScanningQueue )
MetadataRepository metadataRepository )
throws MetadataRepositoryException
{
+ long start = System.currentTimeMillis();
- return repositoryStatisticsManager.getLastStatistics( metadataRepository, repoConfig.getId() ) != null;
+ boolean res = repositoryStatisticsManager.hasStatistics( metadataRepository, repoConfig.getId() );
+
+ long end = System.currentTimeMillis();
+
+ log.debug( "isPreviouslyScanned repo {} {} time: {} ms", repoConfig.getId(), res, ( end - start ) );
+
+ return res;
}
// MRM-848: Pre-configured repository initially appear to be empty