Class CpsThreadGroup
java.lang.Object
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup
- All Implemented Interfaces:
- Serializable
List of 
CpsThreads that form a single CpsFlowExecution.
 
 To make checkpointing easy, only one CpsThread runs at any point in time.
- Author:
- Kohsuke Kawaguchi
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescription"Exported" closures that are referenced by liveCpsStepContexts.
- 
Method SummaryModifier and TypeMethodDescriptionaddThread(Continuable program, org.jenkinsci.plugins.workflow.cps.FlowHead head, org.jenkinsci.plugins.workflow.cps.ContextVariableSet contextVariables) org.jenkinsci.plugins.workflow.cps.BodyReferenceexport(groovy.lang.Closure body) org.jenkinsci.plugins.workflow.cps.BodyReferenceexport(groovy.lang.Script body) getThread(int id) Returns the thread with the specified id.Returns an unmodifiable snapshot of all threads in the thread group.booleanisPaused()Returns true if pausing has been requested.Future<?>pause(boolean persist) Pauses the execution.voidsaveProgram(File f) Future<?>Schedules the execution of all the runnable threads.voidunexport(org.jenkinsci.plugins.workflow.cps.BodyReference ref) voidunpause()If the execution isisPaused(), cancel the pause state.
- 
Field Details- 
closures"Exported" closures that are referenced by liveCpsStepContexts.
 
- 
- 
Method Details- 
getExecution
- 
addThreadpublic CpsThread addThread(@NonNull Continuable program, org.jenkinsci.plugins.workflow.cps.FlowHead head, org.jenkinsci.plugins.workflow.cps.ContextVariableSet contextVariables) 
- 
getThreadReturns the thread with the specified id. Normally called from the CPS VM thread, but may be called from other threads viaCpsStepContext.doGet(java.lang.Class<T>).- Returns:
- null if the thread has finished executing.
 
- 
getThreadsReturns an unmodifiable snapshot of all threads in the thread group.
- 
export@NonNull public org.jenkinsci.plugins.workflow.cps.BodyReference export(@NonNull groovy.lang.Closure body) 
- 
export@NonNull public org.jenkinsci.plugins.workflow.cps.BodyReference export(@NonNull groovy.lang.Script body) 
- 
unexportpublic void unexport(org.jenkinsci.plugins.workflow.cps.BodyReference ref) 
- 
scheduleRunSchedules the execution of all the runnable threads.- Returns:
- Futureobject that represents when the CPS VM is executed.
 
- 
pausePauses the execution.- Parameters:
- persist- whether this is a user-initiated pause that should be persisted
- Returns:
- Futureobject that represents the actual suspension of the CPS VM. When this method is called, the CPS VM might be still executing.
 
- 
unpausepublic void unpause()If the execution isisPaused(), cancel the pause state.
- 
isPausedpublic boolean isPaused()Returns true if pausing has been requested.
- 
getThreadDump
- 
saveProgram- Throws:
- IOException
 
 
-