|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.queue.QueueTaskDispatcher
public abstract class QueueTaskDispatcher
Vetos the execution of a task on a node
To register your dispatcher implementations, put
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Constructor Summary | |
|---|---|
QueueTaskDispatcher()
|
|
| Method Summary | |
|---|---|
static ExtensionList<QueueTaskDispatcher> |
all()
All registered QueueTaskDispatchers. |
abstract CauseOfBlockage |
canTake(Node node,
Queue.Task task)
Called whenever Queue is considering to execute the given task on
a given node. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueueTaskDispatcher()
| Method Detail |
|---|
public abstract CauseOfBlockage canTake(Node node,
Queue.Task task)
Queue is considering to execute the given task on
a given node.
Implementations can return null to indicate that the assignment is fine, or it can return a non-null instance to block the execution of the task on the given node.
Queue doesn't remember/cache the response from dispatchers, and instead it'll keep asking. The upside of this is that it's very easy to block execution for a limited time period ( as you just need to return null when it's ready to execute.) The downside of this is that the decision needs to be made quickly.
Vetos are additive. When multiple QueueTaskDispatchers are in
the system, the task won't run on the given node if any one of them
returns a non-null value. (This relationship is also the same with
built-in check logic.)
public static ExtensionList<QueueTaskDispatcher> all()
QueueTaskDispatchers.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||