Package hudson.model.labels
Interface LabelAssignmentAction
-
- All Superinterfaces:
Action,ModelObject
- All Known Implementing Classes:
ParametersAction
public interface LabelAssignmentAction extends Action
Actionthat can be submitted toQueuethat controls where the task runs.Where to insert
LabelAssignmentActionsIf 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.QueueDecisionHandlerand alter the list of actions that you get. Alternatively, you can implement your ownLoadBalancerand 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 LabelgetAssignedLabel(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
LabelAssignmentActions take control, eventually toSubTask.getAssignedLabel(). If non-null value is returned, that label will be authoritative.
-
-