Class FlowExecutionList
java.lang.Object
org.jenkinsci.plugins.workflow.flow.FlowExecutionList
- All Implemented Interfaces:
- Iterable<FlowExecution>
Enumerates running builds and ensures they resume after Jenkins is restarted.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classstatic classWhen Jenkins starts up and everything is loaded, be sure to proactively resurrect all the ongoingFlowExecutions so that they start running again.static classWhenever a Pipeline resumes, resume all incomplete steps in itsFlowExecution.static classEnumeratesStepExecutions running insideFlowExecution.static interfaceAlternate mechanism for implementing the storage of the set of builds.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic FlowExecutionListget()booleanReturns true if all executions that were present in thisFlowExecutionListhave been loaded.iterator()Lists all the currentFlowExecutions.voidregister(FlowExecutionOwner self) It is the responsibility of theFlowExecutionOwnerto register itself before it starts executing.static voidsaveAll()voidunregister(FlowExecutionOwner self) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Field Details- 
EXECUTIONS_SUSPENDEDMilestone forTerminatorbetweenTermMilestone.STARTEDandLIST_SAVED. All running builds have been suspended and theirFlowExecutionOwner.getListener()s closed.- See Also:
 
- 
LIST_SAVEDMilestone forTerminatorbetweenEXECUTIONS_SUSPENDEDandTermMilestone.COMPLETED.FlowExecutionListitself has been saved.- See Also:
 
 
- 
- 
Constructor Details- 
FlowExecutionListpublic FlowExecutionList()
 
- 
- 
Method Details- 
iteratorLists all the currentFlowExecutions.- Specified by:
- iteratorin interface- Iterable<FlowExecution>
 
- 
registerIt is the responsibility of theFlowExecutionOwnerto register itself before it starts executing. And likewise, unregister itself after it is completed, even though this class does clean up entries that are no longer running.
- 
unregister
- 
get
- 
isResumptionComplete@Restricted(org.kohsuke.accmod.restrictions.Beta.class) public boolean isResumptionComplete()Returns true if all executions that were present in thisFlowExecutionListhave been loaded.This takes place slightly after InitMilestone.COMPLETEDis reached during Jenkins startup.Useful to avoid resuming Pipelines in contexts that may lead to deadlock. It is not guaranteed that FlowExecution.afterStepExecutionsResumed()has been called at this point.
- 
saveAll@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @Terminator(requires="FlowExecutionList.EXECUTIONS_SUSPENDED", attains="FlowExecutionList.LIST_SAVED") public static void saveAll() throws InterruptedException- Throws:
- InterruptedException
 
 
-