Class JobPropertyStrategy
- java.lang.Object
-
- jenkins.advancedqueue.priority.PriorityStrategy
-
- jenkins.advancedqueue.priority.strategy.AbstractDynamicPriorityStrategy
-
- jenkins.advancedqueue.priority.strategy.JobPropertyStrategy
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PriorityStrategy>
public class JobPropertyStrategy extends AbstractDynamicPriorityStrategy
- Since:
- 3.0
- Author:
- Magnus Sandberg
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JobPropertyStrategy.UserIdCauseStrategyDescriptor
-
Nested classes/interfaces inherited from class jenkins.advancedqueue.priority.strategy.AbstractDynamicPriorityStrategy
AbstractDynamicPriorityStrategy.AbstractDynamicPriorityStrategyDescriptor
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description JobPropertyStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
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
-
Methods inherited from class jenkins.advancedqueue.priority.strategy.AbstractDynamicPriorityStrategy
getDescriptor, numberPrioritiesUpdates
-
Methods inherited from class jenkins.advancedqueue.priority.PriorityStrategy
all
-
-
-
-
Method Detail
-
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
-
-