- All Known Subinterfaces:
- All Known Implementing Classes:
public interface TraversalINTERNAL API
Graphs to be materialized are defined by their traversal. There is no explicit graph information tracked, instead a sequence of steps required to "reconstruct" the graph.
"Reconstructing" a graph here has a very clear-cut definition: assign a gapless range of integers from 0..connectionCount to inputs and outputs of modules, so that those that are wired together receive the same number (and those which are not receive different numbers). This feature can be used to - materialize a graph, using the slots as indices to an array of Publishers/Subscribers that need to be wired together - fuse a graph, using the slots to construct a
akka.stream.impl.fusing.GraphInterpreter.GraphAssemblywhich uses a similar layout - create a DOT formatted output for visualization - convert the graph to another data structure
The Traversal is designed to be position independent so that multiple traversals can be composed relatively simply. This particular feature also avoids issues with multiply imported modules where the identity must be encoded somehow. The two imports don't need any special treatment as they are at different positions in the traversal. See
MaterializeAtomicand comments in akka.stream.impl.package for more details.