Package jenkins.model.queue
Class ItemDeletion
- java.lang.Object
-
- hudson.model.Queue.QueueDecisionHandler
-
- jenkins.model.queue.ItemDeletion
-
- All Implemented Interfaces:
ExtensionPoint
@Extension public class ItemDeletion extends Queue.QueueDecisionHandler
AQueue.QueueDecisionHandlerthat blocks items being deleted from entering the queue.- Since:
- 2.55
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ItemDeletion()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancontains(Item item)Checks 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(Item item)Register 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.QueueDecisionHandler
all
-
-
-
-
Method Detail
-
contains
public static boolean contains(@NonNull Item item)Checks if the suppliedItemor any of itsItem.getParent()are being deleted.- Parameters:
item- the item.- Returns:
trueif theItemor any of itsItem.getParent()are being deleted.
-
isRegistered
public static boolean isRegistered(@NonNull Item item)Checks if the suppliedItemis explicitly registered for deletion.- Parameters:
item- the item.- Returns:
trueif and only if the suppliedItemhas been register(Item)ed for deletion.
-
register
public static boolean register(@NonNull Item item)Register the suppliedItemfor deletion.- Parameters:
item- theItemthat is to be deleted.- Returns:
trueif and only if theItemwas registered and the caller is now responsible to callderegister(Item).
-
deregister
public static void deregister(@NonNull Item item)Deregister the suppliedItemfor deletion.- Parameters:
item- theItemthat was to be deleted and is now either deleted or the delete was aborted.
-
shouldSchedule
public boolean shouldSchedule(Queue.Task p, List<Action> actions)
Description copied from class:Queue.QueueDecisionHandlerReturns whether the new item should be scheduled.- Specified by:
shouldSchedulein classQueue.QueueDecisionHandleractions- List of actions that are to be made available asActionable.getActions()upon the start of the build. This list is live, and can be mutated.
-
-