Class DockerContainerWatchdog
java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
hudson.model.PeriodicWork
hudson.model.AsyncPeriodicWork
com.nirima.jenkins.plugins.docker.DockerContainerWatchdog
- All Implemented Interfaces:
ExtensionPoint,Runnable
Periodic job which gets executed by Jenkins automatically. Ensures the
consistency of the containers currently running on the docker and the nodes
which are attached to this Jenkins instance.
- Author:
- eaglerainbow
-
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.AsyncPeriodicWork
nameFields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(TaskListener listener) protected List<DockerCloud>protected Stringlongprotected voidprotected booleanstopAndRemoveContainer(DockerAPI dockerApi, org.slf4j.Logger aLogger, String description, boolean removeVolumes, String containerId, boolean stop) Methods inherited from class hudson.model.AsyncPeriodicWork
createListener, doRun, getErrorLoggingLevel, getLogFile, getNormalLoggingLevel, getSlowLoggingLevelMethods inherited from class hudson.model.PeriodicWork
all, getInitialDelay, initMethods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, runMethods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Constructor Details
-
DockerContainerWatchdog
public DockerContainerWatchdog()
-
-
Method Details
-
getRecurrencePeriod
public long getRecurrencePeriod()- Specified by:
getRecurrencePeriodin classPeriodicWork
-
getAllClouds
-
getAllNodes
-
getJenkinsInstanceId
-
removeNode
- Throws:
IOException
-
stopAndRemoveContainer
-
execute
- Specified by:
executein classAsyncPeriodicWork- Throws:
IOExceptionInterruptedException
-