Class FQBaseStrategy
java.lang.Object
jenkins.advancedqueue.sorter.SorterStrategy
jenkins.advancedqueue.sorter.strategy.MultiBucketStrategy
jenkins.advancedqueue.sorter.strategy.FQBaseStrategy
- All Implemented Interfaces:
ExtensionPoint
,Describable<SorterStrategy>
- Direct Known Subclasses:
FQStrategy
,WFQStrategy
Scheduler based on Fair Queuing algorithm.
- Since:
- 2.0
- Author:
- Magnus Sandberg
-
Nested Class Summary
Nested classes/interfaces inherited from class jenkins.advancedqueue.sorter.strategy.MultiBucketStrategy
MultiBucketStrategy.MultiBucketStrategyDescriptor
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class jenkins.advancedqueue.sorter.strategy.MultiBucketStrategy
DEFAULT_PRIORITIES_NUMBER, DEFAULT_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected float
getMinimumWeightToAssign
(int priority) protected float
getWeightToUse
(int priority, float minimumWeightToAssign) onNewItem
(Queue.Item item, SorterStrategyCallback weightCallback) Called when a newItem
enters the queue.void
onStartedItem
(Queue.LeftItem item, float weight) Called when aItem
leaves the queue and it is started.Methods inherited from class jenkins.advancedqueue.sorter.strategy.MultiBucketStrategy
doFillDefaultPriorityItems, getDefaultPriority, getNumberOfPriorities
Methods inherited from class jenkins.advancedqueue.sorter.SorterStrategy
all, getAllSorterStrategies, getDescriptor, getPrioritySorterStrategy, getSorterStrategy, onCanceledItem
-
Field Details
-
MIN_STEP_SIZE
protected static final float MIN_STEP_SIZE- See Also:
-
-
Constructor Details
-
FQBaseStrategy
public FQBaseStrategy() -
FQBaseStrategy
public FQBaseStrategy(int numberOfPriorities, int defaultPriority)
-
-
Method Details
-
onStartedItem
Description copied from class:SorterStrategy
Called when aItem
leaves the queue and it is started.- Overrides:
onStartedItem
in classSorterStrategy
- Parameters:
item
- theQueue.LeftItem
weight
- the weight assigned when the item entered the queue
-
onNewItem
Description copied from class:SorterStrategy
Called when a newItem
enters the queue.- Specified by:
onNewItem
in classSorterStrategy
- Parameters:
item
- theQueue.WaitingItem
orBuildableItem
that enters the queueweightCallback
- the callback holds the priority to use anded the called method must set the weight before returning- Returns:
- the
SorterStrategyCallback
provided to the call must be returned
-
getMinimumWeightToAssign
protected float getMinimumWeightToAssign(int priority) -
getWeightToUse
protected float getWeightToUse(int priority, float minimumWeightToAssign)
-