Package hudson.model.labels
Interface LabelAssignmentAction
-
- All Superinterfaces:
Action
,ModelObject
- All Known Implementing Classes:
ParametersAction
public interface LabelAssignmentAction extends Action
Action
that can be submitted toQueue
that controls where the task runs.Where to insert
LabelAssignmentAction
sIf 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 ownLoadBalancer
and bypass the whole label/assignment mechanism to control the decision into your own hands.- Since:
- 1.416
- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Label
getAssignedLabel(SubTask task)
Reassigns where the task gets run.-
Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
-
-
-
-
Method Detail
-
getAssignedLabel
Label getAssignedLabel(@NonNull SubTask task)
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.
-
-