public class ECSRetentionStrategy extends RetentionStrategy<ECSComputer> implements ExecutorListener
| Modifier and Type | Class and Description |
|---|---|
static class |
ECSRetentionStrategy.DescriptorImpl |
RetentionStrategy.Always, RetentionStrategy.DemandExtensionPoint.LegacyInstancesAreScopedToHudson| Modifier and Type | Field and Description |
|---|---|
static boolean |
DISABLED |
INSTANCE, LIST, NOOP| Constructor and Description |
|---|
ECSRetentionStrategy(String idleTerminationMinutes) |
| Modifier and Type | Method and Description |
|---|---|
long |
check(@NotNull ECSComputer ecsComputer) |
protected Object |
readResolve() |
void |
start(@NotNull ECSComputer c)
Called when a new
ECSComputer object is introduced (such as when Hudson started, or when
a new agent is added.) |
void |
taskAccepted(Executor executor,
Queue.Task task) |
void |
taskCompleted(Executor executor,
Queue.Task task,
long l) |
void |
taskCompletedWithProblems(Executor executor,
Queue.Task task,
long l,
Throwable throwable) |
all, isAcceptingTasks, isManualLaunchAllowedgetDescriptor@DataBoundConstructor public ECSRetentionStrategy(String idleTerminationMinutes)
protected Object readResolve()
public void start(@NotNull
@NotNull ECSComputer c)
ECSComputer object is introduced (such as when Hudson started, or when
a new agent is added.)
When Jenkins has just started, we don't want to spin up all the instances, so we only start if the EC2 instance is already running
start in class RetentionStrategy<ECSComputer>public void taskAccepted(Executor executor, Queue.Task task)
taskAccepted in interface ExecutorListenerpublic void taskCompleted(Executor executor, Queue.Task task, long l)
taskCompleted in interface ExecutorListenerpublic void taskCompletedWithProblems(Executor executor, Queue.Task task, long l, Throwable throwable)
taskCompletedWithProblems in interface ExecutorListenerpublic long check(@NotNull
@NotNull ECSComputer ecsComputer)
check in class RetentionStrategy<ECSComputer>Copyright © 2016–2021. All rights reserved.