hudson.plugins.slave_squatter
Class SlaveSquatter
java.lang.Object
hudson.model.AbstractDescribableImpl<SlaveSquatter>
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
Method Summary |
abstract int |
sizeOfReservation(hudson.model.Computer computer,
long timestamp)
Returns the number of executors that should be reserved at the specified time. |
abstract long |
timeOfNextChange(hudson.model.Computer computer,
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 |
SlaveSquatter
public SlaveSquatter()
sizeOfReservation
public abstract int sizeOfReservation(hudson.model.Computer computer,
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.
- Parameters:
computer
- Computer for which the reservation is computed.
timeOfNextChange
public abstract long timeOfNextChange(hudson.model.Computer computer,
long timestamp)
- Given the timestamp, return the nearest future timestamp (including itself --- the ceil semantics)
when the size of the reservation changes.
Jenkins uses this information to figure out the scheduling that takes the future capacity
change into account.
Copyright © 2004-2011. All Rights Reserved.