Package jenkins.model.queue
Class QueueIdStrategy.DefaultStrategy
java.lang.Object
jenkins.model.queue.QueueIdStrategy
jenkins.model.queue.QueueIdStrategy.DefaultStrategy
- All Implemented Interfaces:
ExtensionPoint
- Enclosing class:
- QueueIdStrategy
Default implementation if no extension is found. Simply uses a counter.
-
Nested Class Summary
Nested classes/interfaces inherited from class jenkins.model.queue.QueueIdStrategy
QueueIdStrategy.DefaultStrategy
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
generateIdFor
(Queue.Task project, List<Action> actions) Generates a new ID for the given project and actions.static long
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.Methods inherited from class jenkins.model.queue.QueueIdStrategy
get
-
Constructor Details
-
DefaultStrategy
public DefaultStrategy()
-
-
Method Details
-
generateIdFor
Description copied from class:QueueIdStrategy
Generates a new ID for the given project and actions.- Specified by:
generateIdFor
in classQueueIdStrategy
- Parameters:
project
- The task to be queued.actions
- The actions linked the task.- Returns:
- a new queue ID.
-
persist
Description copied from class:QueueIdStrategy
Persist the state of this strategy.- Overrides:
persist
in classQueueIdStrategy
-
load
Description copied from class:QueueIdStrategy
Loads the state of this strategy from a persisted queue state.- Overrides:
load
in classQueueIdStrategy
-
getCurrentCounterValue
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public static long getCurrentCounterValue()
-