Package hudson.model.queue
Class QueueSorter
java.lang.Object
hudson.model.queue.QueueSorter
- All Implemented Interfaces:
- ExtensionPoint
- Direct Known Subclasses:
- AbstractQueueSorterImpl
Singleton extension point for sorting buildable items
- Since:
- 1.343
- 
Nested Class SummaryNested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Comparator<Queue.BlockedItem> A comparator that sortsQueue.BlockedIteminstances based on how long they have been in the queue.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ExtensionList<QueueSorter> all()All registeredQueueSorters.static voidInstalls the default queue sorter.voidsortBlockedItems(List<Queue.BlockedItem> blockedItems) Sorts the blocked items list.abstract voidsortBuildableItems(List<Queue.BuildableItem> buildables) Sorts the buildable items list.
- 
Field Details- 
DEFAULT_BLOCKED_ITEM_COMPARATORA comparator that sortsQueue.BlockedIteminstances based on how long they have been in the queue. (We want the time since in queue by default as blocking on upstream/downstream considers waiting items also and thus the blocking starts once the task is in the queue not once the task is buildable)- Since:
- 1.618
 
 
- 
- 
Constructor Details- 
QueueSorterpublic QueueSorter()
 
- 
- 
Method Details- 
sortBuildableItemsSorts the buildable items list. The items at the beginning will be executed before the items at the end of the list.- Parameters:
- buildables- List of buildable items in the queue. Never null.
 
- 
sortBlockedItemsSorts the blocked items list. The items at the beginning will be considered for removal from the blocked state before the items at the end of the list.- Parameters:
- blockedItems- List of blocked items in the queue. Never null.
- Since:
- 1.618
 
- 
allAll registeredQueueSorters. Only the first one will be picked up, unless explicitly overridden byQueue.setSorter(QueueSorter).
- 
installDefaultQueueSorterInstalls the default queue sorter.Queue(LoadBalancer)is too early to do this
 
-