Package io.jenkins.plugins.yc
Class YandexRetentionStrategy
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<RetentionStrategy<?>>
-
- hudson.slaves.RetentionStrategy<YCComputer>
-
- io.jenkins.plugins.yc.YandexRetentionStrategy
-
- All Implemented Interfaces:
ExtensionPoint,Describable<RetentionStrategy<?>>,ExecutorListener
public class YandexRetentionStrategy extends RetentionStrategy<YCComputer> implements ExecutorListener
-
-
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 Modifier and Type Field Description static booleanDISABLED-
Fields inherited from class hudson.slaves.RetentionStrategy
INSTANCE, LIST, NOOP
-
-
Constructor Summary
Constructors Constructor Description YandexRetentionStrategy(String idleTerminationMinutes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcheck(YCComputer c)protected ObjectreadResolve()voidstart(YCComputer c)Called when a newYCComputerobject is introduced (such as when Hudson started, or when a new agent is added.)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, 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
taskAccepted, taskStarted
-
-
-
-
Constructor Detail
-
YandexRetentionStrategy
@DataBoundConstructor public YandexRetentionStrategy(String idleTerminationMinutes)
-
-
Method Detail
-
taskCompleted
public void taskCompleted(Executor executor, Queue.Task task, long l)
- Specified by:
taskCompletedin interfaceExecutorListener
-
taskCompletedWithProblems
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long l, Throwable throwable)
- Specified by:
taskCompletedWithProblemsin interfaceExecutorListener
-
start
public void start(@NonNull YCComputer c)Called when a newYCComputerobject 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 YC instance is already running
- Overrides:
startin classRetentionStrategy<YCComputer>
-
check
public long check(@NonNull YCComputer c)- Specified by:
checkin classRetentionStrategy<YCComputer>
-
readResolve
protected Object readResolve()
-
-