hudson.plugins.slave_squatter
Class SlaveSquatter

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<SlaveSquatter>
      extended by hudson.plugins.slave_squatter.SlaveSquatter
All Implemented Interfaces:
hudson.model.Describable<SlaveSquatter>
Direct Known Subclasses:
CronSquatter

public abstract class SlaveSquatter
extends hudson.model.AbstractDescribableImpl<SlaveSquatter>

Author:
Kohsuke Kawaguchi

Constructor Summary
SlaveSquatter()
           
 
Method Summary
abstract  int sizeOfReservation(long timestamp)
          Returns the number of executors that should be reserved at the specified time.
abstract  long timeOfNextChange(long timestamp)
          Given the timestamp, return the nearest future timestamp (including itself --- the ceil semantics) when the size of the reservation changes.
 
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
 

Constructor Detail

SlaveSquatter

public SlaveSquatter()
Method Detail

sizeOfReservation

public abstract int sizeOfReservation(long timestamp)
Returns the number of executors that should be reserved at the specified time.

The timestamp is the same format as Date.getTime(). The precision is 1 minute, and thus the caller should set the second and millisecond portion to 00.000.


timeOfNextChange

public abstract long timeOfNextChange(long timestamp)
Given the timestamp, return the nearest future timestamp (including itself --- the ceil semantics) when the size of the reservation changes.

Hudson uses this information to figure out the scheduling that takes the future capacity change into account.



Copyright © 2010. All Rights Reserved.