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.QueueDecisionHandler
that 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 boolean
contains(Item item)
Checks if the suppliedItem
or any of itsItem.getParent()
are being deleted.static void
deregister(Item item)
Deregister the suppliedItem
for deletion.static boolean
isRegistered(Item item)
Checks if the suppliedItem
is explicitly registered for deletion.static boolean
register(Item item)
Register the suppliedItem
for deletion.boolean
shouldSchedule(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 suppliedItem
or any of itsItem.getParent()
are being deleted.- Parameters:
item
- the item.- Returns:
true
if theItem
or any of itsItem.getParent()
are being deleted.
-
isRegistered
public static boolean isRegistered(@NonNull Item item)
Checks if the suppliedItem
is explicitly registered for deletion.- Parameters:
item
- the item.- Returns:
true
if and only if the suppliedItem
has been register(Item)ed for deletion.
-
register
public static boolean register(@NonNull Item item)
Register the suppliedItem
for deletion.- Parameters:
item
- theItem
that is to be deleted.- Returns:
true
if and only if theItem
was registered and the caller is now responsible to callderegister(Item)
.
-
deregister
public static void deregister(@NonNull Item item)
Deregister the suppliedItem
for deletion.- Parameters:
item
- theItem
that 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.QueueDecisionHandler
Returns whether the new item should be scheduled.- Specified by:
shouldSchedule
in classQueue.QueueDecisionHandler
actions
- 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.
-
-