Package jenkins.advancedqueue.priority
Class PriorityStrategy
java.lang.Object
jenkins.advancedqueue.priority.PriorityStrategy
- All Implemented Interfaces:
ExtensionPoint,Describable<PriorityStrategy>
- Direct Known Subclasses:
AbstractDynamicPriorityStrategy,AbstractStaticPriorityStrategy,JobGroup.PriorityStrategyHolder
public abstract class PriorityStrategy
extends Object
implements ExtensionPoint, Describable<PriorityStrategy>
- Since:
- 2.0
- Author:
- Magnus Sandberg
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionall()abstract intgetPriority(Queue.Item item) Method that that return the priority that should be used for thisQueue.Item, this method is only called idisApplicable(Queue.Item)returned true The caller garanties that theQueue.Item.taskis aJobabstract booleanisApplicable(Queue.Item item) Method that checks if strategy can assign a priority to the providedQueue.ItemThe caller guaranties that theQueue.Item.taskis aJobabstract voidnumberPrioritiesUpdates(int oldNumberOfPriorities, int newNumberOfPriorities) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Constructor Details
-
PriorityStrategy
public PriorityStrategy()
-
-
Method Details
-
isApplicable
Method that checks if strategy can assign a priority to the providedQueue.ItemThe caller guaranties that theQueue.Item.taskis aJob- Parameters:
item- theQueue.Itemto check- Returns:
trueif thePriorityStrategyis applicable elsefalse
-
getPriority
Method that that return the priority that should be used for thisQueue.Item, this method is only called idisApplicable(Queue.Item)returned true The caller garanties that theQueue.Item.taskis aJob- Parameters:
item- theQueue.Itemto check- Returns:
- the priority to be used by the provided
Queue.Item
-
numberPrioritiesUpdates
public abstract void numberPrioritiesUpdates(int oldNumberOfPriorities, int newNumberOfPriorities) -
all
-