Package jenkins.model.queue
Class QueueIdStrategy
java.lang.Object
jenkins.model.queue.QueueIdStrategy
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
QueueIdStrategy.DefaultStrategy
@Restricted(org.kohsuke.accmod.restrictions.Beta.class)
public abstract class QueueIdStrategy
extends Object
implements ExtensionPoint
Pluggable strategy to generate queue item IDs as well as persist an optional opaque state whenever the queue is persisted.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Default implementation if no extension is found.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract long
generateIdFor
(Queue.Task project, List<Action> actions) Generates a new ID for the given project and actions.static QueueIdStrategy
get()
void
load
(Queue.State queueState) Loads the state of this strategy from a persisted queue state.void
persist
(Queue.State queueState) Persist the state of this strategy.
-
Constructor Details
-
QueueIdStrategy
public QueueIdStrategy()
-
-
Method Details
-
get
-
persist
Persist the state of this strategy. -
load
Loads the state of this strategy from a persisted queue state. -
generateIdFor
Generates a new ID for the given project and actions.- Parameters:
project
- The task to be queued.actions
- The actions linked the task.- Returns:
- a new queue ID.
-