diff options
author | Olivier Lamy <olamy@apache.org> | 2012-12-19 15:18:31 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-12-19 15:18:31 +0000 |
commit | 0c55117416a2fd829e840015ce3c1cbed4232a5a (patch) | |
tree | f47b890a855a2952b2d44040f0dd65767d2d24ba /archiva-modules/archiva-scheduler/archiva-scheduler-repository | |
parent | a538626d57b6174eb7b401eff7e683198ee48c71 (diff) | |
download | archiva-0c55117416a2fd829e840015ce3c1cbed4232a5a.tar.gz archiva-0c55117416a2fd829e840015ce3c1cbed4232a5a.zip |
add some StopWatch to get time on what happened here
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1423874 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-scheduler/archiva-scheduler-repository')
-rw-r--r-- | archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java index bb031cf3e..1fc88a9be 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java @@ -35,6 +35,7 @@ import org.apache.archiva.redback.components.taskqueue.TaskQueue; import org.apache.archiva.redback.components.taskqueue.TaskQueueException; import org.apache.archiva.scheduler.repository.model.RepositoryArchivaTaskScheduler; import org.apache.archiva.scheduler.repository.model.RepositoryTask; +import org.apache.commons.lang.time.StopWatch; import org.quartz.SchedulerException; import org.quartz.impl.JobDetailImpl; import org.quartz.impl.triggers.CronTriggerImpl; @@ -55,7 +56,7 @@ import java.util.Set; /** * Default implementation of a scheduling component for archiva. */ -@Service ("archivaTaskScheduler#repository") +@Service("archivaTaskScheduler#repository") public class DefaultRepositoryArchivaTaskScheduler implements RepositoryArchivaTaskScheduler, ConfigurationListener { @@ -74,7 +75,7 @@ public class DefaultRepositoryArchivaTaskScheduler * */ @Inject - @Named (value = "taskQueue#repository-scanning") + @Named(value = "taskQueue#repository-scanning") private TaskQueue repositoryScanningQueue; /** @@ -87,7 +88,7 @@ public class DefaultRepositoryArchivaTaskScheduler * */ @Inject - @Named (value = "repositoryStatisticsManager#default") + @Named(value = "repositoryStatisticsManager#default") private RepositoryStatisticsManager repositoryStatisticsManager; /** @@ -116,6 +117,10 @@ public class DefaultRepositoryArchivaTaskScheduler public void startup() throws ArchivaException { + + StopWatch stopWatch = new StopWatch(); + stopWatch.start(); + archivaConfiguration.addListener( this ); List<ManagedRepositoryConfiguration> repositories = @@ -158,6 +163,8 @@ public class DefaultRepositoryArchivaTaskScheduler repositorySession.close(); } + stopWatch.stop(); + log.info( "Time to initalize DefaultRepositoryArchivaTaskScheduler: {} ms", stopWatch.getTime() ); } @@ -174,7 +181,7 @@ public class DefaultRepositoryArchivaTaskScheduler } - @SuppressWarnings ("unchecked") + @SuppressWarnings("unchecked") public boolean isProcessingRepositoryTask( String repositoryId ) { synchronized ( repositoryScanningQueue ) @@ -298,7 +305,6 @@ public class DefaultRepositoryArchivaTaskScheduler } } - @SuppressWarnings ("unchecked") private boolean isPreviouslyScanned( ManagedRepositoryConfiguration repoConfig, MetadataRepository metadataRepository ) throws MetadataRepositoryException |