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 QueueItemCache
get()
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 activeItemInfo
s this will include Items mapped toQueue.BuildableItem
s as well asQueue.BlockedItem
sremoveItem
(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
ItemInfo
for the provided id ornull
if 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
ItemInfo
for the last know start of the Job. Can benull
if job didn't run yet
-
addItem
-
removeItem
Deprecated. -
removeItem
-
getSortedList
This method will return a sorted list of all known and activeItemInfo
s this will include Items mapped toQueue.BuildableItem
s as well asQueue.BlockedItem
s- Returns:
- the sorted list of all
ItemInfo
s
-