Package org.nuxeo.lib.stream.computation
Class Topology
- java.lang.Object
-
- org.nuxeo.lib.stream.computation.Topology
-
public class Topology extends Object
Represent a Directed Acyclic Graph (DAG) of computations.- Since:
- 9.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Topology.Builder
static class
Topology.Vertex
static class
Topology.VertexType
-
Field Summary
Fields Modifier and Type Field Description protected org.jgrapht.experimental.dag.DirectedAcyclicGraph<Topology.Vertex,org.jgrapht.graph.DefaultEdge>
dag
protected List<ComputationMetadataMapping>
metadataList
protected Map<String,ComputationMetadataMapping>
metadataMap
protected Map<String,Supplier<Computation>>
supplierMap
-
Constructor Summary
Constructors Modifier Constructor Description protected
Topology(Topology.Builder builder)
-
Method Summary
-
-
-
Field Detail
-
metadataList
protected final List<ComputationMetadataMapping> metadataList
-
metadataMap
protected final Map<String,ComputationMetadataMapping> metadataMap
-
supplierMap
protected final Map<String,Supplier<Computation>> supplierMap
-
dag
protected final org.jgrapht.experimental.dag.DirectedAcyclicGraph<Topology.Vertex,org.jgrapht.graph.DefaultEdge> dag
-
-
Constructor Detail
-
Topology
protected Topology(Topology.Builder builder)
-
-
Method Detail
-
builder
public static Topology.Builder builder()
-
toPlantuml
public String toPlantuml()
A plantuml representation of the topology.
-
compactPolicy
protected String compactPolicy(ComputationPolicy policy)
-
getPumlName
protected String getPumlName(Topology.Vertex vertex)
-
generateDag
protected void generateDag(Set<ComputationMetadataMapping> metadataSet) throws org.jgrapht.experimental.dag.DirectedAcyclicGraph.CycleFoundException
- Throws:
org.jgrapht.experimental.dag.DirectedAcyclicGraph.CycleFoundException
-
generateMetadataMapping
protected void generateMetadataMapping(Set<ComputationMetadataMapping> metadataSet)
-
getMetadata
public ComputationMetadataMapping getMetadata(String name)
-
getSupplier
public Supplier<Computation> getSupplier(String name)
-
isSource
public boolean isSource(String name)
-
isSink
public boolean isSink(String name)
-
metadataList
public List<ComputationMetadataMapping> metadataList()
-
getVertex
protected Topology.Vertex getVertex(String name)
-
getDag
public org.jgrapht.experimental.dag.DirectedAcyclicGraph<Topology.Vertex,org.jgrapht.graph.DefaultEdge> getDag()
-
-