Package hudson.slaves
Class ComputerRetentionWork
java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
hudson.model.AperiodicWork
hudson.slaves.ComputerRetentionWork
- All Implemented Interfaces:
ExtensionPoint,Runnable
Periodically checks the agents and try to reconnect dead agents.
- Author:
- Kohsuke Kawaguchi, Stephen Connolly
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.triggers.SafeTimerTask
SafeTimerTask.ExceptionRunnableNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.AperiodicWork
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGets new instance of task to be executed.longGets the number of milliseconds between successive executions.Methods inherited from class hudson.model.AperiodicWork
all, doRun, getInitialDelay, initMethods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, runMethods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Constructor Details
-
ComputerRetentionWork
public ComputerRetentionWork()
-
-
Method Details
-
getRecurrencePeriod
public long getRecurrencePeriod()Description copied from class:AperiodicWorkGets the number of milliseconds between successive executions.Jenkins calls this method every time the timer task is scheduled.
- Specified by:
getRecurrencePeriodin classAperiodicWork
-
getNewInstance
Description copied from class:AperiodicWorkGets new instance of task to be executed. Method should return new instance each time, as there no check, if previously scheduled task already finished. Returning same instance could lead to throwingIllegalStateException(especially in case ofAsyncAperiodicWork) and therefore scheduling of next tasks will be broken.- Specified by:
getNewInstancein classAperiodicWork- Returns:
- AperiodicWork - timer task instance to be executed
-
doAperiodicRun
protected void doAperiodicRun()- Specified by:
doAperiodicRunin classAperiodicWork
-