Class ChunkVisitor
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
- com.cloudbees.workflow.rest.external.ChunkVisitor
-
- All Implemented Interfaces:
org.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
public class ChunkVisitor extends org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
Couples to the new analysis APIs to collect stages for processing. This is where all the interesting parts happen.- Author:
- Sam Van Oort
-
-
Constructor Summary
Constructors Constructor Description ChunkVisitor(org.jenkinsci.plugins.workflow.job.WorkflowRun run)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
atomNode(org.jenkinsci.plugins.workflow.graph.FlowNode before, org.jenkinsci.plugins.workflow.graph.FlowNode atomNode, org.jenkinsci.plugins.workflow.graph.FlowNode after, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scan)
void
chunkEnd(org.jenkinsci.plugins.workflow.graph.FlowNode endNode, org.jenkinsci.plugins.workflow.graph.FlowNode afterBlock, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner)
Called when hitting the end of a block (determined by the chunkEndPredicate)void
chunkStart(org.jenkinsci.plugins.workflow.graph.FlowNode startNode, org.jenkinsci.plugins.workflow.graph.FlowNode beforeBlock, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner)
Collection<StageNodeExt>
getStages()
protected void
handleChunkDone(org.jenkinsci.plugins.workflow.graphanalysis.MemoryFlowChunk chunk)
static AtomFlowNodeExt
makeAtomNode(org.jenkinsci.plugins.workflow.job.WorkflowRun run, org.jenkinsci.plugins.workflow.graph.FlowNode beforeNode, org.jenkinsci.plugins.workflow.graph.FlowNode node, org.jenkinsci.plugins.workflow.graph.FlowNode next)
void
parallelEnd(org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, org.jenkinsci.plugins.workflow.graph.FlowNode parallelEndNode, org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner)
protected void
resetChunk(org.jenkinsci.plugins.workflow.graphanalysis.MemoryFlowChunk chunk)
-
-
-
Method Detail
-
getStages
public Collection<StageNodeExt> getStages()
-
makeAtomNode
public static AtomFlowNodeExt makeAtomNode(@NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run, @CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode beforeNode, @NonNull org.jenkinsci.plugins.workflow.graph.FlowNode node, @CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode next)
-
handleChunkDone
protected void handleChunkDone(@NonNull org.jenkinsci.plugins.workflow.graphanalysis.MemoryFlowChunk chunk)
- Overrides:
handleChunkDone
in classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
resetChunk
protected void resetChunk(@NonNull org.jenkinsci.plugins.workflow.graphanalysis.MemoryFlowChunk chunk)
- Overrides:
resetChunk
in classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
chunkStart
public void chunkStart(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode startNode, @CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode beforeBlock, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner)
- Specified by:
chunkStart
in interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
- Overrides:
chunkStart
in classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
chunkEnd
public void chunkEnd(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode endNode, @CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode afterBlock, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner)
Called when hitting the end of a block (determined by the chunkEndPredicate)- Specified by:
chunkEnd
in interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
- Overrides:
chunkEnd
in classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
atomNode
public void atomNode(@CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode before, @NonNull org.jenkinsci.plugins.workflow.graph.FlowNode atomNode, @CheckForNull org.jenkinsci.plugins.workflow.graph.FlowNode after, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scan)
- Specified by:
atomNode
in interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
- Overrides:
atomNode
in classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
parallelEnd
public void parallelEnd(@NonNull org.jenkinsci.plugins.workflow.graph.FlowNode parallelStartNode, @NonNull org.jenkinsci.plugins.workflow.graph.FlowNode parallelEndNode, @NonNull org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner scanner)
- Specified by:
parallelEnd
in interfaceorg.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
- Overrides:
parallelEnd
in classorg.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
-
-