@Extension public class ItemDeletion extends Queue.QueueDecisionHandler
Queue.QueueDecisionHandler
that blocks items being deleted from entering the queue.ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
ItemDeletion() |
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(Item item)
Checks if the supplied
Item or any of its Item.getParent() are being deleted. |
static void |
deregister(Item item)
Deregister the supplied
Item for deletion. |
static boolean |
isRegistered(Item item)
Checks if the supplied
Item is explicitly registered for deletion. |
static boolean |
register(Item item)
Register the supplied
Item for deletion. |
boolean |
shouldSchedule(Queue.Task p,
List<Action> actions)
Returns whether the new item should be scheduled.
|
all
public static boolean contains(@NonNull Item item)
Item
or any of its Item.getParent()
are being deleted.item
- the item.true
if the Item
or any of its Item.getParent()
are being deleted.public static boolean isRegistered(@NonNull Item item)
Item
is explicitly registered for deletion.item
- the item.true
if and only if the supplied Item
has been register(Item)ed for
deletion.public static boolean register(@NonNull Item item)
Item
for deletion.item
- the Item
that is to be deleted.true
if and only if the Item
was registered and the caller is now responsible to call
deregister(Item)
.public static void deregister(@NonNull Item item)
Item
for deletion.item
- the Item
that was to be deleted and is now either deleted or the delete was aborted.public boolean shouldSchedule(Queue.Task p, List<Action> actions)
Queue.QueueDecisionHandler
shouldSchedule
in class Queue.QueueDecisionHandler
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.Copyright © 2004–2021. All rights reserved.