public class DockerOnceRetentionStrategy
extends hudson.slaves.CloudRetentionStrategy
implements hudson.model.ExecutorListener
OnceRetentionStrategy
(1.3) and CloudRetentionStrategy
that allows configure it parameters and has Descriptor.
Retention strategy that allows a cloud slave to run only a single build before disconnecting.
A ContinuableExecutable
does not trigger termination.
Modifier and Type | Class and Description |
---|---|
static class |
DockerOnceRetentionStrategy.DescriptorImpl |
Constructor and Description |
---|
DockerOnceRetentionStrategy(int idleMinutes)
Creates the retention strategy.
|
Modifier and Type | Method and Description |
---|---|
long |
check(hudson.slaves.AbstractCloudComputer acc) |
protected void |
done(hudson.slaves.AbstractCloudComputer<?> c) |
protected void |
done(hudson.model.Executor executor) |
boolean |
equals(Object o) |
int |
getIdleMinutes() |
int |
hashCode() |
void |
start(hudson.slaves.AbstractCloudComputer c) |
void |
taskAccepted(hudson.model.Executor executor,
hudson.model.Queue.Task task) |
void |
taskCompleted(hudson.model.Executor executor,
hudson.model.Queue.Task task,
long durationMS) |
void |
taskCompletedWithProblems(hudson.model.Executor executor,
hudson.model.Queue.Task task,
long durationMS,
Throwable problems) |
@DataBoundConstructor public DockerOnceRetentionStrategy(int idleMinutes)
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 taskpublic int getIdleMinutes()
public long check(hudson.slaves.AbstractCloudComputer acc)
check
in class hudson.slaves.CloudRetentionStrategy
public void start(hudson.slaves.AbstractCloudComputer c)
start
in class hudson.slaves.CloudRetentionStrategy
public void taskAccepted(hudson.model.Executor executor, hudson.model.Queue.Task task)
taskAccepted
in interface hudson.model.ExecutorListener
public void taskCompleted(hudson.model.Executor executor, hudson.model.Queue.Task task, long durationMS)
taskCompleted
in interface hudson.model.ExecutorListener
public void taskCompletedWithProblems(hudson.model.Executor executor, hudson.model.Queue.Task task, long durationMS, Throwable problems)
taskCompletedWithProblems
in interface hudson.model.ExecutorListener
protected void done(hudson.model.Executor executor)
protected void done(hudson.slaves.AbstractCloudComputer<?> c)
Copyright © 2016–2020. All rights reserved.