Package hudson.model.labels
Interface LabelAssignmentAction
- All Superinterfaces:
Action
,ModelObject
- All Known Implementing Classes:
ParametersAction
Action
that can be submitted to Queue
that controls where
the task runs.
Where to insert LabelAssignmentAction
s
If you control when the task gets submitted to the queue, you can associate this action
to the task by passing it as a parameter to method like Queue.schedule(Task, int, Action...)
.
If you want to globally affect the scheduling decision, you can do so by Queue.QueueDecisionHandler
and alter the list of actions that you get. Alternatively, you can implement your own LoadBalancer
and bypass the whole label/assignment mechanism to control the decision into your own hands.
- Since:
- 1.416
- Author:
- Kohsuke Kawaguchi
-
Method Summary
Modifier and TypeMethodDescriptiongetAssignedLabel
(SubTask task) Reassigns where the task gets run.Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
-
Method Details
-
getAssignedLabel
Reassigns where the task gets run.- Parameters:
task
- Never null.- Returns:
- null to let other
LabelAssignmentAction
s take control, eventually toSubTask.getAssignedLabel()
. If non-null value is returned, that label will be authoritative.
-