diff --git a/core/src/main/java/hudson/model/Queue.java b/core/src/main/java/hudson/model/Queue.java index 167d1d8b60a46f284318e7cfdda361bed2df453d..468b88e2d227922ce0648dbef7ab38188ceb664c 100644 --- a/core/src/main/java/hudson/model/Queue.java +++ b/core/src/main/java/hudson/model/Queue.java @@ -1365,14 +1365,18 @@ public class Queue extends ResourceController implements Saveable { * to the queue, and the task will never get executed. * *
- * This extension point is still a subject to change, as we are seeking more
- * comprehensive Queue pluggability. See HUDSON-2072.
+ * The other use case is to add additional {@link Action}s to the task
+ * (for example {@link LabelAssignmentAction}) to tasks that are submitted to the queue.
*
* @since 1.316
*/
public static abstract class QueueDecisionHandler implements ExtensionPoint {
/**
* Returns whether the new item should be scheduled.
+ *
+ * @param actions
+ * List of actions that are to be made available as {@link AbstractBuild#getActions()}
+ * upon the start of the build. This list is live, and can be mutated.
*/
public abstract boolean shouldSchedule(Task p, List
+ * 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 {@link Queue#schedule(Task, int, Action...)}.
+ *
+ *
+ * If you want to globally affect the scheduling decision, you can do so by {@link QueueDecisionHandler}
+ * and alter the list of actions that you get. Alternatively, you can implement your own {@link LoadBalancer}
+ * and bypass the whole label/assignment mechanism to control the decision into your own hands.
+ *
* @author Kohsuke Kawaguchi
* @since 1.416
*/
Where to insert {@link LabelAssignmentAction}s
+ *