public interface LabelAssignmentAction extends Action
Action
that can be submitted to Queue
that controls where
the task runs.
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.
Modifier and Type | Method and Description |
---|---|
Label |
getAssignedLabel(SubTask task)
Reassigns where the task gets run.
|
getDisplayName, getIconFileName, getUrlName
Label getAssignedLabel(@NonNull SubTask task)
task
- Never null.LabelAssignmentAction
s take control, eventually to SubTask.getAssignedLabel()
.
If non-null value is returned, that label will be authoritative.Copyright © 2004–2021. All rights reserved.