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.Demand
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.slaves.CloudRetentionStrategy
disabled
Fields inherited from class hudson.slaves.RetentionStrategy
INSTANCE, LIST, NOOP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
void
void
taskAccepted
(Executor executor, Queue.Task task) void
taskCompleted
(Executor executor, Queue.Task task, long durationMS) void
taskCompletedWithProblems
(Executor executor, Queue.Task task, long durationMS, Throwable problems) Methods inherited from class hudson.slaves.RetentionStrategy
all, isAcceptingTasks, isManualLaunchAllowed
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
check
in classCloudRetentionStrategy
-
start
- Overrides:
start
in classCloudRetentionStrategy
-
taskAccepted
- Specified by:
taskAccepted
in interfaceExecutorListener
-
taskCompleted
- Specified by:
taskCompleted
in interfaceExecutorListener
-
taskCompletedWithProblems
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) - Specified by:
taskCompletedWithProblems
in interfaceExecutorListener
-