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 boolean
DISABLED
-
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 long
check(YCComputer c)
protected Object
readResolve()
void
start(YCComputer c)
Called when a newYCComputer
object is introduced (such as when Hudson started, or when a new agent is added.)void
taskCompleted(Executor executor, Queue.Task task, long l)
void
taskCompletedWithProblems(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:
taskCompleted
in interfaceExecutorListener
-
taskCompletedWithProblems
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long l, Throwable throwable)
- Specified by:
taskCompletedWithProblems
in interfaceExecutorListener
-
start
public void start(@NonNull YCComputer c)
Called when a newYCComputer
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 YC instance is already running
- Overrides:
start
in classRetentionStrategy<YCComputer>
-
check
public long check(@NonNull YCComputer c)
- Specified by:
check
in classRetentionStrategy<YCComputer>
-
readResolve
protected Object readResolve()
-
-