hudson.slaves
Class CloudRetentionStrategy

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<RetentionStrategy<?>>
      extended by hudson.slaves.RetentionStrategy<AbstractCloudComputer>
          extended by hudson.slaves.CloudRetentionStrategy
All Implemented Interfaces:
ExtensionPoint, Describable<RetentionStrategy<?>>

public class CloudRetentionStrategy
extends RetentionStrategy<AbstractCloudComputer>

RetentionStrategy implementation for AbstractCloudComputer that terminates it if it remains idle for X minutes.

Since:
1.382
Author:
Kohsuke Kawaguchi

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
static boolean disabled
           
 
Fields inherited from class hudson.slaves.RetentionStrategy
INSTANCE, LIST, NOOP
 
Constructor Summary
CloudRetentionStrategy(int idleMinutes)
           
 
Method Summary
 long check(AbstractCloudComputer c)
          This method will be called periodically to allow this strategy to decide what to do with it's owning slave.
 void start(AbstractCloudComputer c)
          Try to connect to it ASAP.
 
Methods inherited from class hudson.slaves.RetentionStrategy
all, 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
 

Field Detail

disabled

public static boolean disabled
Constructor Detail

CloudRetentionStrategy

public CloudRetentionStrategy(int idleMinutes)
Method Detail

check

public long check(AbstractCloudComputer c)
Description copied from class: RetentionStrategy
This method will be called periodically to allow this strategy to decide what to do with it's owning slave.

Specified by:
check in class RetentionStrategy<AbstractCloudComputer>
Parameters:
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.
Returns:
The number of minutes after which the strategy would like to be checked again. The strategy may be rechecked earlier or later that this!

start

public void start(AbstractCloudComputer c)
Try to connect to it ASAP.

Overrides:
start in class RetentionStrategy<AbstractCloudComputer>


Copyright © 2004-2013. All Rights Reserved.