|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.AbstractDescribableImpl<RetentionStrategy<?>>
hudson.slaves.RetentionStrategy<T>
public abstract class RetentionStrategy<T extends Computer>
Controls when to take Computer
offline, bring it back online, or even to destroy it.
Nested Class Summary | |
---|---|
static class |
RetentionStrategy.Always
RetentionStrategy that tries to keep the node online all the time. |
static class |
RetentionStrategy.Demand
RetentionStrategy that tries to keep the node offline when not in use. |
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Field Summary | |
---|---|
static RetentionStrategy.Always |
INSTANCE
Convenient singleton instance, since this RetentionStrategy is stateless. |
static DescriptorList<RetentionStrategy<?>> |
LIST
Deprecated. as of 1.286 Use all() for read access, and Extension for registration. |
static RetentionStrategy<Computer> |
NOOP
Dummy instance that doesn't do any attempt to retention. |
Constructor Summary | |
---|---|
RetentionStrategy()
|
Method Summary | |
---|---|
static DescriptorExtensionList<RetentionStrategy<?>,Descriptor<RetentionStrategy<?>>> |
all()
Returns all the registered RetentionStrategy descriptors. |
abstract long |
check(T c)
This method will be called periodically to allow this strategy to decide what to do with it's owning slave. |
boolean |
isManualLaunchAllowed(T c)
This method is called to determine whether manual launching of the slave is allowed at this point in time. |
void |
start(T c)
Called when a new Computer object is introduced (such as when Hudson started, or when
a new slave is added.) |
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 |
Field Detail |
---|
public static final DescriptorList<RetentionStrategy<?>> LIST
all()
for read access, and Extension
for registration.RetentionStrategy
implementations.
public static final RetentionStrategy<Computer> NOOP
public static final RetentionStrategy.Always INSTANCE
RetentionStrategy
is stateless.
Constructor Detail |
---|
public RetentionStrategy()
Method Detail |
---|
public abstract long check(T c)
c
- Computer
for which this strategy is assigned. This computer may be online or offline.
This object also exposes a bunch of properties that the callee can use to decide what action to take.
public boolean isManualLaunchAllowed(T c)
c
- Computer
for which this strategy is assigned. This computer may be online or offline.
This object also exposes a bunch of properties that the callee can use to decide if manual launching is
allowed at this time.
true
if manual launching of the slave is allowed at this point in time.public void start(T c)
Computer
object is introduced (such as when Hudson started, or when
a new slave is added.)
The default implementation of this method delegates to check(Computer)
,
but this allows RetentionStrategy
to distinguish the first time invocation from the rest.
public static DescriptorExtensionList<RetentionStrategy<?>,Descriptor<RetentionStrategy<?>>> all()
RetentionStrategy
descriptors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |