public interface ElementGraph
FlowElement
instances.
An element graph represents an assembly of Pipe
instances bound to source and sink
Tap
instances.
Typically an element graph is fed to a FlowPlanner
which in return creates
a collection of new element graph instances that represent an executable version of the original graph.
During the planning, multiple intermediate element graphs will be created representing the full graph down to elemental sub-graphs.
There are many concrete implementations of the ElementGraph interface to support this process.
Frequently an element graph will have a single head represented by the singleton Extent.head
and
a single tail represented by the singleton Extent.tail
. These are markers to improve the navigability
of the element graph. They can be simply masked by wrapping an element graph instance with a
ElementMaskSubGraph
class.
An element graph may be annotated if it implements the AnnotatedGraph
interface.
Annotated graphs have FlowElement instances that may have Enum
instances associated with them. A given
planner may have rules that apply annotations to various elements that inform a given platform during execuction
or downstream rules in the planner RuleRegistry
.
Any element graph can be written to a DOT file format for visualization via the writeDOT(String)
method.
Modifier and Type | Method and Description |
---|---|
Scope |
addEdge(FlowElement lhs,
FlowElement rhs) |
boolean |
addEdge(FlowElement lhs,
FlowElement rhs,
Scope scope) |
boolean |
addHeadVertex(FlowElement flowElement) |
boolean |
addTailVertex(FlowElement flowElement) |
boolean |
addVertex(FlowElement flowElement) |
ElementGraph |
bindExtents() |
boolean |
containsEdge(FlowElement lhs,
FlowElement rhs) |
boolean |
containsEdge(Scope scope) |
boolean |
containsVertex(FlowElement flowElement) |
ElementGraph |
copyElementGraph() |
java.util.Set<Scope> |
edgeSet() |
java.util.Set<Scope> |
edgesOf(FlowElement flowElement) |
java.util.Set<Scope> |
getAllEdges(FlowElement lhs,
FlowElement rhs) |
Scope |
getEdge(FlowElement lhs,
FlowElement rhs) |
FlowElement |
getEdgeSource(Scope scope) |
FlowElement |
getEdgeTarget(Scope scope) |
java.util.Set<Scope> |
incomingEdgesOf(FlowElement flowElement) |
int |
inDegreeOf(FlowElement flowElement) |
int |
outDegreeOf(FlowElement flowElement) |
java.util.Set<Scope> |
outgoingEdgesOf(FlowElement flowElement) |
java.util.List<FlowElement> |
predecessorListOf(FlowElement flowElement) |
boolean |
removeAllEdges(java.util.Collection<? extends Scope> scopes) |
java.util.Set<Scope> |
removeAllEdges(FlowElement lhs,
FlowElement rhs) |
boolean |
removeAllVertices(java.util.Collection<? extends FlowElement> flowElements) |
Scope |
removeEdge(FlowElement lhs,
FlowElement rhs) |
boolean |
removeEdge(Scope scope) |
boolean |
removeVertex(FlowElement flowElement) |
java.util.List<FlowElement> |
successorListOf(FlowElement flowElement) |
java.util.Set<FlowElement> |
vertexSet()
Returns an immutable identity based Set.
|
java.util.Set<FlowElement> |
vertexSetCopy()
Returns a copy of
vertexSet() as an identity based Set suitable for modifying. |
void |
writeDOT(java.lang.String filename) |
java.util.Set<Scope> getAllEdges(FlowElement lhs, FlowElement rhs)
Scope getEdge(FlowElement lhs, FlowElement rhs)
Scope addEdge(FlowElement lhs, FlowElement rhs)
boolean addEdge(FlowElement lhs, FlowElement rhs, Scope scope)
boolean addHeadVertex(FlowElement flowElement)
boolean addTailVertex(FlowElement flowElement)
boolean addVertex(FlowElement flowElement)
boolean containsEdge(FlowElement lhs, FlowElement rhs)
boolean containsEdge(Scope scope)
boolean containsVertex(FlowElement flowElement)
java.util.Set<Scope> edgesOf(FlowElement flowElement)
boolean removeAllEdges(java.util.Collection<? extends Scope> scopes)
java.util.Set<Scope> removeAllEdges(FlowElement lhs, FlowElement rhs)
boolean removeAllVertices(java.util.Collection<? extends FlowElement> flowElements)
Scope removeEdge(FlowElement lhs, FlowElement rhs)
boolean removeEdge(Scope scope)
boolean removeVertex(FlowElement flowElement)
java.util.Set<FlowElement> vertexSet()
java.util.Set<FlowElement> vertexSetCopy()
vertexSet()
as an identity based Set suitable for modifying.FlowElement getEdgeSource(Scope scope)
FlowElement getEdgeTarget(Scope scope)
int inDegreeOf(FlowElement flowElement)
java.util.Set<Scope> incomingEdgesOf(FlowElement flowElement)
int outDegreeOf(FlowElement flowElement)
java.util.Set<Scope> outgoingEdgesOf(FlowElement flowElement)
java.util.List<FlowElement> predecessorListOf(FlowElement flowElement)
java.util.List<FlowElement> successorListOf(FlowElement flowElement)
ElementGraph copyElementGraph()
ElementGraph bindExtents()
void writeDOT(java.lang.String filename)
Copyright © 2007-2017 Cascading Maintainers. All Rights Reserved.