Package jenkins.advancedqueue.sorter
Class QueueItemCache
java.lang.Object
jenkins.advancedqueue.sorter.QueueItemCache
Keeps track of the Queue.Items seen by the Sorter. Uses a WeakHash to store the entries that have
left the queue, this can be used by Strategies that needs this info but still minimizes the need
to lookup the data again from Jenkins Core.
- Since:
- 2.3
- Author:
- Magnus Sandberg
-
Method Summary
Modifier and TypeMethodDescriptionstatic QueueItemCacheget()getItem(long itemId) Deprecated.Get the ItemInfo for the last knows start of this Job NameThis method will return a sorted list of all known and activeItemInfos this will include Items mapped toQueue.BuildableItems as well asQueue.BlockedItemsremoveItem(long itemId) removeItem(Integer itemId) Deprecated.
-
Method Details
-
get
-
getItem
-
getItem
Deprecated.Gets the Item for and itemId/queueId- Parameters:
itemId- the id of a Job currently in the queue- Returns:
- the
ItemInfofor the provided id ornullif the id is not in the queue
-
getItem
Get the ItemInfo for the last knows start of this Job Name- Parameters:
jobName- a name of a Job- Returns:
- the
ItemInfofor the last know start of the Job. Can benullif job didn't run yet
-
addItem
-
removeItem
Deprecated. -
removeItem
-
getSortedList
This method will return a sorted list of all known and activeItemInfos this will include Items mapped toQueue.BuildableItems as well asQueue.BlockedItems- Returns:
- the sorted list of all
ItemInfos
-