Package jenkins.util
Class Timer
java.lang.Object
jenkins.util.Timer
Holds the
ScheduledExecutorService for running all background tasks in Jenkins.
This ExecutorService will create additional threads to execute due (enabled) tasks.
Provides a minimal abstraction for locating the ScheduledExecutorService so that we
can modify it's behavior going forward. For instance, to add manageability/monitoring.
This is not an @Extension because it must be available before any extensions are loaded.
Plugins should probably use one of the following as they provide higher level abstractions:
AperiodicWork, PeriodicWork,
AsyncAperiodicWork, AsyncPeriodicWork.- Since:
- 1.541
- Author:
- Ryan Campbell
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScheduledExecutorServiceget()Returns the scheduled executor service used by all timed tasks in Jenkins.static voidshutdown()Shutdown the timer and throw it away.
-
Method Details
-
get
Returns the scheduled executor service used by all timed tasks in Jenkins.- Returns:
- the single
ScheduledExecutorService.
-
shutdown
public static void shutdown()Shutdown the timer and throw it away.
-