Class LockableResourcesRootAction.Queue
java.lang.Object
org.jenkins.plugins.lockableresources.actions.LockableResourcesRootAction.Queue
- Enclosing class:
LockableResourcesRootAction
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(LockableResourcesStruct resourceStruct, QueuedContextStruct context) voidadd(RemoteQueueEntry remoteEntry) getAll()voidOrders the merged local and remote entries the way they will actually be promoted.
-
Constructor Details
-
Queue
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Queue()
-
-
Method Details
-
add
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void add(LockableResourcesStruct resourceStruct, QueuedContextStruct context) throws Descriptor.FormException - Throws:
Descriptor.FormException
-
add
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void add(RemoteQueueEntry remoteEntry) -
sortByPromotionOrder
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void sortByPromotionOrder()Orders the merged local and remote entries the way they will actually be promoted.Local and remote entries arrive as two separately ordered lists, so simply concatenating them showed every remote entry behind every local one no matter its priority. Promotion (
LockableResourcesManager#proceedNextContext) compares the heads of both queues and takes the higher priority, favouring local on a tie - which is exactly a stable sort by descending priority over "locals first, then remotes". -
getAll
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<LockableResourcesRootAction.Queue.QueueStruct> getAll() -
getOldest
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public LockableResourcesRootAction.Queue.QueueStruct getOldest()
-