Class OnceRetentionStrategy
java.lang.Object
hudson.model.AbstractDescribableImpl<RetentionStrategy<?>>
hudson.slaves.RetentionStrategy<AbstractCloudComputer>
hudson.slaves.CloudRetentionStrategy
org.jenkinsci.plugins.durabletask.executors.OnceRetentionStrategy
- All Implemented Interfaces:
ExtensionPoint,Describable<RetentionStrategy<?>>,ExecutorListener
Retention strategy that allows a cloud slave to run only a single build before disconnecting.
A
ContinuableExecutable does not trigger termination.-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.slaves.RetentionStrategy
RetentionStrategy.Always, RetentionStrategy.DemandNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.slaves.CloudRetentionStrategy
disabledFields inherited from class hudson.slaves.RetentionStrategy
INSTANCE, LIST, NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongvoidvoidtaskAccepted(Executor executor, Queue.Task task) voidtaskCompleted(Executor executor, Queue.Task task, long durationMS) voidtaskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) Methods inherited from class hudson.slaves.RetentionStrategy
all, isAcceptingTasks, isManualLaunchAllowedMethods inherited from class hudson.model.AbstractDescribableImpl
getDescriptorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.ExecutorListener
taskStarted
-
Constructor Details
-
OnceRetentionStrategy
public OnceRetentionStrategy(int idleMinutes) Creates the retention strategy.- Parameters:
idleMinutes- number of minutes of idleness after which to kill the slave; serves a backup in case the strategy fails to detect the end of a task
-
-
Method Details
-
check
- Overrides:
checkin classCloudRetentionStrategy
-
start
- Overrides:
startin classCloudRetentionStrategy
-
taskAccepted
- Specified by:
taskAcceptedin interfaceExecutorListener
-
taskCompleted
- Specified by:
taskCompletedin interfaceExecutorListener
-
taskCompletedWithProblems
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) - Specified by:
taskCompletedWithProblemsin interfaceExecutorListener
-