public final class CpsThreadGroup extends Object implements Serializable
CpsThread
s that form a single CpsFlowExecution
.
To make checkpointing easy, only one CpsThread
runs at any point in time.
Modifier and Type | Field and Description |
---|---|
Map<Integer,groovy.lang.Closure> |
closures
"Exported" closures that are referenced by live
CpsStepContext s. |
Modifier and Type | Method and Description |
---|---|
CpsThread |
addThread(com.cloudbees.groovy.cps.Continuable program,
org.jenkinsci.plugins.workflow.cps.FlowHead head,
org.jenkinsci.plugins.workflow.cps.ContextVariableSet contextVariables) |
org.jenkinsci.plugins.workflow.cps.BodyReference |
export(groovy.lang.Closure body) |
org.jenkinsci.plugins.workflow.cps.BodyReference |
export(groovy.lang.Script body) |
CpsFlowExecution |
getExecution() |
CpsThread |
getThread(int id)
Returns the thread with the specified id.
|
CpsThreadDump |
getThreadDump() |
Iterable<CpsThread> |
getThreads()
Returns an unmodifiable snapshot of all threads in the thread group.
|
boolean |
isPaused()
Returns true if pausing has been requested.
|
Future<?> |
pause()
Pauses the execution.
|
void |
saveProgram(File f) |
Future<?> |
scheduleRun()
Schedules the execution of all the runnable threads.
|
void |
unexport(org.jenkinsci.plugins.workflow.cps.BodyReference ref) |
void |
unpause()
If the execution is
isPaused() , cancel the pause state. |
public final Map<Integer,groovy.lang.Closure> closures
CpsStepContext
s.public CpsFlowExecution getExecution()
public CpsThread addThread(@Nonnull com.cloudbees.groovy.cps.Continuable program, org.jenkinsci.plugins.workflow.cps.FlowHead head, org.jenkinsci.plugins.workflow.cps.ContextVariableSet contextVariables)
public CpsThread getThread(int id)
CpsStepContext.doGet(java.lang.Class<T>)
.public Iterable<CpsThread> getThreads()
@Nonnull public org.jenkinsci.plugins.workflow.cps.BodyReference export(@Nonnull groovy.lang.Closure body)
@Nonnull public org.jenkinsci.plugins.workflow.cps.BodyReference export(@Nonnull groovy.lang.Script body)
public void unexport(org.jenkinsci.plugins.workflow.cps.BodyReference ref)
public Future<?> scheduleRun()
Future
object that represents when the CPS VM is executed.public Future<?> pause()
public void unpause()
isPaused()
, cancel the pause state.public boolean isPaused()
public CpsThreadDump getThreadDump()
public void saveProgram(File f) throws IOException
IOException
Copyright © 2016–2020. All rights reserved.