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 Constructor Description PriorityStrategy()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DescriptorExtensionList<PriorityStrategy,Descriptor<PriorityStrategy>>
all()
abstract int
getPriority(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.task
is aJob
abstract boolean
isApplicable(Queue.Item item)
Method that checks if strategy can assign a priority to the providedQueue.Item
The caller guaranties that theQueue.Item.task
is aJob
abstract void
numberPrioritiesUpdates(int oldNumberOfPriorities, int newNumberOfPriorities)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.model.Describable
getDescriptor
-
-
-
-
Method Detail
-
isApplicable
public abstract boolean isApplicable(Queue.Item item)
Method that checks if strategy can assign a priority to the providedQueue.Item
The caller guaranties that theQueue.Item.task
is aJob
- Parameters:
item
- theQueue.Item
to check- Returns:
true
if thePriorityStrategy
is applicable elsefalse
-
getPriority
public abstract int getPriority(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.task
is aJob
- Parameters:
item
- theQueue.Item
to check- Returns:
- the priority to be used by the provided
Queue.Item
-
numberPrioritiesUpdates
public abstract void numberPrioritiesUpdates(int oldNumberOfPriorities, int newNumberOfPriorities)
-
all
public static DescriptorExtensionList<PriorityStrategy,Descriptor<PriorityStrategy>> all()
-
-