Class 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
    • Field Summary

      • Fields inherited from class org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor

        chunk
    • 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)  
      • Methods inherited from class org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor

        parallelBranchEnd, parallelBranchStart, parallelStart
    • Constructor Detail

      • ChunkVisitor

        public ChunkVisitor​(@NonNull
                            org.jenkinsci.plugins.workflow.job.WorkflowRun run)
    • Method Detail

      • 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 class org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor
      • resetChunk

        protected void resetChunk​(@NonNull
                                  org.jenkinsci.plugins.workflow.graphanalysis.MemoryFlowChunk chunk)
        Overrides:
        resetChunk in class org.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 interface org.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
        Overrides:
        chunkStart in class org.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 interface org.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
        Overrides:
        chunkEnd in class org.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 interface org.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
        Overrides:
        atomNode in class org.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 interface org.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor
        Overrides:
        parallelEnd in class org.jenkinsci.plugins.workflow.graphanalysis.StandardChunkVisitor