Package jenkins.advancedqueue
Class JobGroup.PriorityStrategyHolder
- java.lang.Object
-
- jenkins.advancedqueue.priority.PriorityStrategy
-
- jenkins.advancedqueue.JobGroup.PriorityStrategyHolder
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PriorityStrategy>
- Enclosing class:
- JobGroup
public static class JobGroup.PriorityStrategyHolder extends PriorityStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JobGroup.PriorityStrategyHolder.PriorityStrategyHolderDescriptor
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description PriorityStrategyHolder()
PriorityStrategyHolder(int id, PriorityStrategy priorityStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Descriptor<PriorityStrategy>
getDescriptor()
int
getId()
int
getPriority(Queue.Item item)
Method that that return the priority that should be used for thisQueue.Item
, this method is only called idPriorityStrategy.isApplicable(Queue.Item)
returned true The caller garanties that theQueue.Item.task
is aJob
PriorityStrategy
getPriorityStrategy()
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
void
numberPrioritiesUpdates(int oldNumberOfPriorities, int newNumberOfPriorities)
void
setId(int id)
void
setPriorityStrategy(PriorityStrategy priorityStrategy)
-
Methods inherited from class jenkins.advancedqueue.priority.PriorityStrategy
all
-
-
-
-
Constructor Detail
-
PriorityStrategyHolder
public PriorityStrategyHolder()
-
PriorityStrategyHolder
@DataBoundConstructor public PriorityStrategyHolder(int id, PriorityStrategy priorityStrategy)
-
-
Method Detail
-
getId
public int getId()
-
setId
public void setId(int id)
-
getPriorityStrategy
public PriorityStrategy getPriorityStrategy()
-
setPriorityStrategy
public void setPriorityStrategy(PriorityStrategy priorityStrategy)
-
getDescriptor
public Descriptor<PriorityStrategy> getDescriptor()
-
isApplicable
public boolean isApplicable(Queue.Item item)
Description copied from class:PriorityStrategy
Method that checks if strategy can assign a priority to the providedQueue.Item
The caller guaranties that theQueue.Item.task
is aJob
- Specified by:
isApplicable
in classPriorityStrategy
- Parameters:
item
- theQueue.Item
to check- Returns:
true
if thePriorityStrategy
is applicable elsefalse
-
getPriority
public int getPriority(Queue.Item item)
Description copied from class:PriorityStrategy
Method that that return the priority that should be used for thisQueue.Item
, this method is only called idPriorityStrategy.isApplicable(Queue.Item)
returned true The caller garanties that theQueue.Item.task
is aJob
- Specified by:
getPriority
in classPriorityStrategy
- Parameters:
item
- theQueue.Item
to check- Returns:
- the priority to be used by the provided
Queue.Item
-
numberPrioritiesUpdates
public void numberPrioritiesUpdates(int oldNumberOfPriorities, int newNumberOfPriorities)
- Specified by:
numberPrioritiesUpdates
in classPriorityStrategy
-
-