public class ElementGraph extends org.jgrapht.graph.SimpleDirectedGraph<FlowElement,Scope>
Modifier and Type | Class and Description |
---|---|
static class |
ElementGraph.Extent |
Modifier and Type | Field and Description |
---|---|
static ElementGraph.Extent |
head
Field head
|
static ElementGraph.Extent |
tail
Field tail
|
Constructor and Description |
---|
ElementGraph(ElementGraph elementGraph) |
ElementGraph(PlatformInfo platformInfo,
Pipe[] pipes,
java.util.Map<java.lang.String,Tap> sources,
java.util.Map<java.lang.String,Tap> sinks,
java.util.Map<java.lang.String,Tap> traps,
java.util.Map<java.lang.String,Tap> checkpoints,
boolean requireUniqueCheckpoints,
PlannerLevel... plannerLevels)
Constructor ElementGraph creates a new ElementGraph instance.
|
Modifier and Type | Method and Description |
---|---|
ElementGraph |
copyElementGraph()
Method copyGraph returns a partial copy of the current ElementGraph.
|
java.util.List<CoGroup> |
findAllCoGroups() |
java.util.List<Each> |
findAllEachSplits()
Method findAllSplits ...
|
java.util.List<Every> |
findAllEveries()
Method findAllEveries ...
|
java.util.List<Group> |
findAllGroups()
Method findAllGroups ...
|
java.util.List<Group> |
findAllMergeJoinGroups()
Finds all groups that merge/join streams.
|
java.util.List<Splice> |
findAllMergeJoinSplices()
Finds all splices that merge/join streams.
|
<P> java.util.List<P> |
findAllOfType(int minInDegree,
int minOutDegree,
java.lang.Class<P> type,
java.util.List<P> results)
Method findAllOfType ...
|
java.util.List<Pipe> |
findAllPipeSplits() |
java.util.List<Tap> |
findAllTaps()
Method findAllTaps ...
|
java.util.Set<FlowElement> |
getAllChildrenNotExactlyType(FlowElement flowElement,
java.lang.Class<? extends FlowElement> type) |
<A extends FlowElement> |
getAllChildrenOfType(FlowElement flowElement,
java.lang.Class<A> type) |
java.util.List<org.jgrapht.GraphPath<FlowElement,Scope>> |
getAllShortestPathsBetweenExtents()
Method getAllShortestPathsBetweenExtents returns the allShortestPathsBetweenExtents of this ElementGraph object.
|
java.util.List<org.jgrapht.GraphPath<FlowElement,Scope>> |
getAllShortestPathsFrom(FlowElement flowElement)
Method getAllShortestPathsFrom ...
|
java.util.List<org.jgrapht.GraphPath<FlowElement,Scope>> |
getAllShortestPathsTo(FlowElement flowElement)
Method getAllShortestPathsTo ...
|
java.util.List<FlowElement> |
getAllSuccessors(FlowElement element) |
java.util.Map<java.lang.String,Tap> |
getCheckpointsMap() |
org.jgrapht.traverse.DepthFirstIterator<FlowElement,Scope> |
getDepthFirstIterator()
Method getDepthFirstIterator returns the depthFirstIterator of this ElementGraph object.
|
int |
getMaxNumPathsBetweenElementAndGroupingMergeJoin(FlowElement flowElement) |
java.util.Map<java.lang.String,Tap> |
getSinkMap() |
java.util.Collection<Tap> |
getSinks() |
java.util.Map<java.lang.String,Tap> |
getSourceMap() |
java.util.Collection<Tap> |
getSources() |
org.jgrapht.traverse.TopologicalOrderIterator<FlowElement,Scope> |
getTopologicalIterator()
Method getTopologicalIterator returns the topologicalIterator of this ElementGraph object.
|
java.util.Map<java.lang.String,Tap> |
getTrapMap() |
java.util.Collection<Tap> |
getTraps() |
void |
insertFlowElementAfter(FlowElement previousElement,
FlowElement flowElement) |
org.jgrapht.graph.SimpleDirectedGraph<Tap,java.lang.Integer> |
makeTapGraph()
Method makeTapGraph returns a directed graph of all taps in the current element graph.
|
protected void |
printElementGraph(java.lang.String filename,
org.jgrapht.graph.SimpleDirectedGraph<FlowElement,Scope> graph) |
void |
removeUnnecessaryPipes()
Method removeEmptyPipes performs a depth first traversal and removes instance of
Pipe or SubAssembly . |
void |
replaceElementWith(FlowElement element,
FlowElement replacement) |
void |
resolveFields()
Method resolveFields performs a breadth first traversal and resolves the tuple fields between each Pipe instance.
|
void |
writeDOT(java.lang.String filename)
Method writeDOT writes this element graph to a DOT file for easy visualization and debugging.
|
addEdge, addEdge, addVertex, clone, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, incomingEdgesOf, inDegreeOf, isAllowingLoops, isAllowingMultipleEdges, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeSetFactory, setEdgeWeight, vertexSet
assertVertexExist, containsEdge, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
public static final ElementGraph.Extent head
public static final ElementGraph.Extent tail
public ElementGraph(ElementGraph elementGraph)
public ElementGraph(PlatformInfo platformInfo, Pipe[] pipes, java.util.Map<java.lang.String,Tap> sources, java.util.Map<java.lang.String,Tap> sinks, java.util.Map<java.lang.String,Tap> traps, java.util.Map<java.lang.String,Tap> checkpoints, boolean requireUniqueCheckpoints, PlannerLevel... plannerLevels)
pipes
- of type Pipe[]sources
- of type Mapsinks
- of type Mappublic java.util.Map<java.lang.String,Tap> getSourceMap()
public java.util.Map<java.lang.String,Tap> getSinkMap()
public java.util.Map<java.lang.String,Tap> getTrapMap()
public java.util.Map<java.lang.String,Tap> getCheckpointsMap()
public java.util.Collection<Tap> getSources()
public java.util.Collection<Tap> getSinks()
public java.util.Collection<Tap> getTraps()
public ElementGraph copyElementGraph()
public org.jgrapht.traverse.TopologicalOrderIterator<FlowElement,Scope> getTopologicalIterator()
public java.util.List<org.jgrapht.GraphPath<FlowElement,Scope>> getAllShortestPathsFrom(FlowElement flowElement)
flowElement
- of type FlowElementpublic java.util.List<org.jgrapht.GraphPath<FlowElement,Scope>> getAllShortestPathsTo(FlowElement flowElement)
flowElement
- of type FlowElementpublic java.util.List<org.jgrapht.GraphPath<FlowElement,Scope>> getAllShortestPathsBetweenExtents()
public org.jgrapht.traverse.DepthFirstIterator<FlowElement,Scope> getDepthFirstIterator()
public void writeDOT(java.lang.String filename)
filename
- of type Stringprotected void printElementGraph(java.lang.String filename, org.jgrapht.graph.SimpleDirectedGraph<FlowElement,Scope> graph)
public void removeUnnecessaryPipes()
Pipe
or SubAssembly
.public void resolveFields()
public java.util.List<Group> findAllMergeJoinGroups()
public java.util.List<Splice> findAllMergeJoinSplices()
public java.util.List<CoGroup> findAllCoGroups()
public java.util.List<Group> findAllGroups()
public java.util.List<Every> findAllEveries()
public java.util.List<Tap> findAllTaps()
public java.util.List<Each> findAllEachSplits()
public java.util.List<Pipe> findAllPipeSplits()
public <P> java.util.List<P> findAllOfType(int minInDegree, int minOutDegree, java.lang.Class<P> type, java.util.List<P> results)
minInDegree
- of type intminOutDegree
- type
- of type Classresults
- of type List@return List
public void insertFlowElementAfter(FlowElement previousElement, FlowElement flowElement)
public org.jgrapht.graph.SimpleDirectedGraph<Tap,java.lang.Integer> makeTapGraph()
public int getMaxNumPathsBetweenElementAndGroupingMergeJoin(FlowElement flowElement)
public java.util.List<FlowElement> getAllSuccessors(FlowElement element)
public void replaceElementWith(FlowElement element, FlowElement replacement)
public <A extends FlowElement> java.util.Set<A> getAllChildrenOfType(FlowElement flowElement, java.lang.Class<A> type)
public java.util.Set<FlowElement> getAllChildrenNotExactlyType(FlowElement flowElement, java.lang.Class<? extends FlowElement> type)