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.ExceptionRunnable
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.AsyncPeriodicWork
name
Fields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
execute
(TaskListener listener) protected List<DockerCloud>
protected String
long
protected void
protected boolean
stopAndRemoveContainer
(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, getSlowLoggingLevel
Methods inherited from class hudson.model.PeriodicWork
all, getInitialDelay, init
Methods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, run
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Constructor Details
-
DockerContainerWatchdog
public DockerContainerWatchdog()
-
-
Method Details
-
getRecurrencePeriod
public long getRecurrencePeriod()- Specified by:
getRecurrencePeriod
in classPeriodicWork
-
getAllClouds
-
getAllNodes
-
getJenkinsInstanceId
-
removeNode
- Throws:
IOException
-
stopAndRemoveContainer
-
execute
- Specified by:
execute
in classAsyncPeriodicWork
- Throws:
IOException
InterruptedException
-