Package com.amazon.jenkins.ec2fleet
Class EC2RetentionStrategy
java.lang.Object
hudson.model.AbstractDescribableImpl<RetentionStrategy<?>>
hudson.slaves.RetentionStrategy<EC2FleetNodeComputer>
com.amazon.jenkins.ec2fleet.EC2RetentionStrategy
- All Implemented Interfaces:
ExtensionPoint,Describable<RetentionStrategy<?>>,ExecutorListener
public class EC2RetentionStrategy
extends RetentionStrategy<EC2FleetNodeComputer>
implements ExecutorListener
The
EC2RetentionStrategy controls when to take EC2FleetNodeComputer offline, bring it back online, or even to destroy it.-
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.RetentionStrategy
INSTANCE, LIST, NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongWill be called underQueue.withLock(Runnable)voidvoidtaskAccepted(Executor executor, Queue.Task task) voidtaskCompleted(Executor executor, Queue.Task task, long l) voidtaskCompletedWithProblems(Executor executor, Queue.Task task, long l, Throwable throwable) 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
-
EC2RetentionStrategy
public EC2RetentionStrategy()
-
-
Method Details
-
check
Will be called underQueue.withLock(Runnable)- Specified by:
checkin classRetentionStrategy<EC2FleetNodeComputer>- Parameters:
fc- EC2FleetNodeComputer- Returns:
- delay in min before next run
-
start
- Overrides:
startin classRetentionStrategy<EC2FleetNodeComputer>
-
taskAccepted
- Specified by:
taskAcceptedin interfaceExecutorListener
-
taskCompleted
- Specified by:
taskCompletedin interfaceExecutorListener
-
taskCompletedWithProblems
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long l, Throwable throwable) - Specified by:
taskCompletedWithProblemsin interfaceExecutorListener
-