|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.LoadBalancer
public abstract class LoadBalancer
Strategy that decides which Queue.Task
gets run on which Executor
.
Field Summary | |
---|---|
static LoadBalancer |
CONSISTENT_HASH
Uses a consistent hash for scheduling. |
static LoadBalancer |
DEFAULT
Deprecated. as of 1.377 The only implementation in the core now is the one based on consistent hash. |
Constructor Summary | |
---|---|
LoadBalancer()
|
Method Summary | |
---|---|
abstract MappingWorksheet.Mapping |
map(Queue.Task task,
MappingWorksheet worksheet)
Chooses the executor(s) to carry out the build for the given task. |
protected LoadBalancer |
sanitize()
Wraps this LoadBalancer into a decorator that tests the basic sanity of the implementation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final LoadBalancer CONSISTENT_HASH
public static final LoadBalancer DEFAULT
Constructor Detail |
---|
public LoadBalancer()
Method Detail |
---|
public abstract MappingWorksheet.Mapping map(Queue.Task task, MappingWorksheet worksheet)
This method is invoked from different threads, but the execution is serialized by the caller.
The thread that invokes this method always holds a lock to Queue
, so queue contents
can be safely introspected from this method, if that information is necessary to make
decisions.
task
- The task whose execution is being considered. Never null.worksheet
- The work sheet that represents the matching that needs to be made.
The job of this method is to determine which work units on this worksheet
are executed on which executors (also on this worksheet.)
protected LoadBalancer sanitize()
LoadBalancer
into a decorator that tests the basic sanity of the implementation.
Only override this if you find some of the checks excessive, but beware that it's like driving without a seat belt.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |