Package jenkins.model.queue
Class ItemDeletion
java.lang.Object
hudson.model.Queue.QueueDecisionHandler
jenkins.model.queue.ItemDeletion
- All Implemented Interfaces:
- ExtensionPoint
A 
Queue.QueueDecisionHandler that blocks items being deleted from entering the queue.- Since:
- 2.55
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidcancelBuildsInProgress(Item initiatingItem) Cancels any builds in progress of this item (if a job) or descendants (if a folder).static booleanChecks if the suppliedItemor any of itsItem.getParent()are being deleted.static voidderegister(Item item) Deregister the suppliedItemfor deletion.static booleanisRegistered(Item item) Checks if the suppliedItemis explicitly registered for deletion.static booleanRegister the suppliedItemfor deletion.booleanshouldSchedule(Queue.Task p, List<Action> actions) Returns whether the new item should be scheduled.Methods inherited from class hudson.model.Queue.QueueDecisionHandlerall
- 
Constructor Details- 
ItemDeletionpublic ItemDeletion()
 
- 
- 
Method Details- 
containsChecks if the suppliedItemor any of itsItem.getParent()are being deleted.- Parameters:
- item- the item.
- Returns:
- trueif the- Itemor any of its- Item.getParent()are being deleted.
 
- 
isRegisteredChecks if the suppliedItemis explicitly registered for deletion.- Parameters:
- item- the item.
- Returns:
- trueif and only if the supplied- Itemhas been register(Item)ed for deletion.
 
- 
registerRegister the suppliedItemfor deletion.- Parameters:
- item- the- Itemthat is to be deleted.
- Returns:
- trueif and only if the- Itemwas registered and the caller is now responsible to call- deregister(Item).
 
- 
deregisterDeregister the suppliedItemfor deletion.- Parameters:
- item- the- Itemthat was to be deleted and is now either deleted or the delete was aborted.
 
- 
shouldScheduleDescription copied from class:Queue.QueueDecisionHandlerReturns whether the new item should be scheduled.- Specified by:
- shouldSchedulein class- Queue.QueueDecisionHandler
- Parameters:
- actions- List of actions that are to be made available as- Actionable.getActions()upon the start of the build. This list is live, and can be mutated.
 
- 
cancelBuildsInProgresspublic static void cancelBuildsInProgress(@NonNull Item initiatingItem) throws Failure, InterruptedException Cancels any builds in progress of this item (if a job) or descendants (if a folder). Also cancels any associated queue items.- Parameters:
- initiatingItem- an item being deleted
- Throws:
- Failure
- InterruptedException
- Since:
- 2.470
 
 
-