FlowNodes produced from a pipeline execution.
The core APIs are described in the javadocs for
But in general it provides for iteration through the Directed Acyclic Graph (DAG) of a flow, filtering, search for matches, and
visiting all nodes via internal iteration.
Static methods and a few implementations are also provided in
How To Pick A FlowScanner For Iteration
- Want fast iteration, don't care about visiting every node or parallels?
- Visit every node as fast as possible?
- Visit every block in a predictable order, from end to start?
- Fastest way to find preceding sibling or enclosing nodes?
Methods to iterate through flow graph and break it into chunks (regions) of interest, with nesting possible and reporting of branches:
ChunkFinder- API to define conditions for starting/ending a chunk
SimpleChunkVisitor- Visitor API that accepts callbacks for chunk boundaries/contenst + parallel branching
FlowChunk- A region of interest, defined by its first and last nodes
FlowChunkWithContext- A FlowChunk that knows about the nodes before/after it, to give context for determining success/failure and the time taken to execute
Data structures and implementations:
MemoryFlowChunk- A FlowChunkWithContext that just directly stores FlowNodes
StandardChunkVisitor- a basic concrete implementation of SimpleChunkVisitor that tracks one chunk at a time (no nesting) and runs a callback when the chunk is done
LabelledChunkFinder- ChunkFinder that matches against nodes with a label
BlockChunkFinder- ChunkFinder that creates chunks from blocks
Interface Summary Interface Description ChunkFinder Filterator<T>Iterator that may be navigated through a filtered wrapper. FlowChunkCommon container interface for a series of
FlowNodes with a logical start and end.
FlowChunkWithContextFlowChunk with information about what comes before/after FlowNodeVisitorInterface used when examining a pipeline FlowNode graph node by node, and terminating when a condition is met ParallelFlowChunk<ChunkType extends FlowChunk>FlowChunk mapping to the block from a Parallel step (with parallel branches inside) SimpleChunkVisitorThis visitor's callbacks are invoked as we walk through a pipeline flow graph, and it splits it into chunks.
Class Summary Class Description AbstractFlowScannerCore APIs and base logic for FlowScanners that extract information from a pipeline execution. BlockChunkFinderMatches start and end of a block. DepthFirstScannerDoes a simple and somewhat efficient depth-first search of all FlowNodes in the DAG. FlowScanningUtilsLibrary of common functionality when analyzing/walking flow graphs ForkScannerScanner that will scan down all forks when we hit parallel blocks before continuing, but generally runs in linear order LabelledChunkFinderSplits a flow execution into
FlowChunks whenever you have a label.
LinearScannerthat skips nested blocks at the current level, useful for finding enclosing blocks.
LinearScannerScans through the flow graph in strictly linear fashion, visiting only the first branch in parallel blocks. MemoryFlowChunkFlowChunk that holds direct references to the
FlowNodeinstances and context info This makes it easy to use in analysis and visualizations, but inappropriate to retain in caches, etc
NodeStepNamePredicate NodeStepTypePredicate ParallelMemoryFlowChunkCorresponds to a parallel block, acts as an in-memory container that can plug into status/timing APIs StandardChunkVisitorSimple handler for linear
FlowChunks (basic stages, etc), and designed to be extended.