cascading.flow.planner.process

## Class BaseProcessGraph<Process extends ProcessModel>

- java.lang.Object
- - cascading.flow.planner.process.BaseProcessGraph<Process>

- All Implemented Interfaces:
    ProcessGraph<Process>, java.io.Serializable
  Direct Known Subclasses:
    FlowNodeGraph, FlowStepGraph

      public abstract class BaseProcessGraph<Process extends ProcessModel>
      extends java.lang.Object
      implements ProcessGraph<Process>

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Set<FlowElement>` | `sinkElements`
    `protected java.util.Set<FlowElement>` | `sourceElements`
    `protected java.util.Map<java.lang.String,Tap>` | `trapsMap`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseProcessGraph()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ProcessEdge` | `addEdge(Process sourceVertex, Process targetVertex)`
    `boolean` | `addEdge(Process sourceVertex, Process targetVertex, ProcessEdge processEdge)`
    `boolean` | `addVertex(Process process)`
    `void` | `bindEdges()`
    `boolean` | `containsEdge(ProcessEdge processEdge)`
    `boolean` | `containsEdge(Process sourceVertex, Process targetVertex)`
    `boolean` | `containsVertex(Process process)`
    `java.util.Set<ProcessEdge>` | `edgeSet()`
    `java.util.Set<ProcessEdge>` | `edgesOf(Process vertex)`
    `java.util.Set<ProcessEdge>` | `getAllEdges(Process sourceVertex, Process targetVertex)`
    `java.util.Set<FlowElement>` | `getAllSinkElements()`
    `java.util.Set<FlowElement>` | `getAllSourceElements()`
    `EnumMultiMap<FlowElement>` | `getAnnotations()`
    `java.util.Set<FlowElement>` | `getDuplicatedElements(ElementGraph elementGraph)` All elements, from the given ElementGraph, that belong to two or more processes, that are not sink or source elements that connect processes.
    `ProcessEdge` | `getEdge(Process sourceVertex, Process targetVertex)`
    `Process` | `getEdgeSource(ProcessEdge processEdge)`
    `Process` | `getEdgeTarget(ProcessEdge processEdge)`
    `double` | `getEdgeWeight(ProcessEdge processEdge)`
    `java.util.Set<ElementGraph>` | `getElementGraphs()`
    `java.util.List<ElementGraph>` | `getElementGraphs(FlowElement flowElement)`
    `java.util.List<ElementGraph>` | `getElementGraphs(Scope scope)`
    `java.util.List<Process>` | `getElementProcesses(FlowElement flowElement)`
    `java.util.List<Process>` | `getElementProcesses(Scope scope)`
    `java.util.List<Process>` | `getElementSinkProcesses(FlowElement flowElement)`
    `java.util.List<Process>` | `getElementSourceProcesses(FlowElement flowElement)`
    `java.util.Set<ElementGraph>` | `getIdentityElementGraphs()`
    `java.util.Set<Process>` | `getIdentityProcesses()` Returns a set of processes that perform no internal operations.
    `java.util.Iterator<Process>` | `getOrderedTopologicalIterator(java.util.Comparator<Process> comparator)`
    `java.util.Iterator<Process>` | `getOrdinalTopologicalIterator()`
    `java.util.Set<FlowElement>` | `getSinkElements()`
    `java.util.Set<Tap>` | `getSinkTaps()`
    `java.util.Map<java.lang.String,Tap>` | `getSinkTapsMap()`
    `java.util.Set<FlowElement>` | `getSourceElements()`
    `java.util.Set<Tap>` | `getSourceTaps()`
    `java.util.Map<java.lang.String,Tap>` | `getSourceTapsMap()`
    `java.util.Iterator<Process>` | `getTopologicalIterator()`
    `java.util.Map<java.lang.String,Tap>` | `getTrapsMap()`
    `java.util.Set<ProcessEdge>` | `incomingEdgesOf(Process vertex)`
    `int` | `inDegreeOf(Process vertex)`
    `int` | `outDegreeOf(Process vertex)`
    `java.util.Set<ProcessEdge>` | `outgoingEdgesOf(Process vertex)`
    `protected void` | `printProcessGraph(java.lang.String filename)`
    `boolean` | `removeAllEdges(java.util.Collection<? extends ProcessEdge> edges)`
    `java.util.Set<ProcessEdge>` | `removeAllEdges(Process sourceVertex, Process targetVertex)`
    `boolean` | `removeAllVertices(java.util.Collection<? extends Process> vertices)`
    `boolean` | `removeEdge(ProcessEdge processEdge)`
    `ProcessEdge` | `removeEdge(Process sourceVertex, Process targetVertex)`
    `boolean` | `removeVertex(Process process)`
    `java.util.Set<Process>` | `vertexSet()`
    `void` | `writeDOT(java.lang.String filename)` Method writeDOT writes this element graph to a DOT file for easy visualization and debugging.
    `void` | `writeDOTNested(java.lang.String filename, ElementGraph graph)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### sourceElements

          protected java.util.Set<FlowElement> sourceElements

    - #### sinkElements

          protected java.util.Set<FlowElement> sinkElements

    - #### trapsMap

          protected java.util.Map<java.lang.String,Tap> trapsMap

  - ### Constructor Detail

    - #### BaseProcessGraph

          public BaseProcessGraph()

  - ### Method Detail

    - #### addVertex

          public boolean addVertex(Process process)

      Specified by:
        `addVertex` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### bindEdges

          public void bindEdges()

    - #### getSourceElements

          public java.util.Set<FlowElement> getSourceElements()

      Specified by:
        `getSourceElements` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getSinkElements

          public java.util.Set<FlowElement> getSinkElements()

      Specified by:
        `getSinkElements` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getSourceTaps

          public java.util.Set<Tap> getSourceTaps()

      Specified by:
        `getSourceTaps` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getSourceTapsMap

          public java.util.Map<java.lang.String,Tap> getSourceTapsMap()

      Specified by:
        `getSourceTapsMap` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getSinkTaps

          public java.util.Set<Tap> getSinkTaps()

      Specified by:
        `getSinkTaps` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getSinkTapsMap

          public java.util.Map<java.lang.String,Tap> getSinkTapsMap()

      Specified by:
        `getSinkTapsMap` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getTrapsMap

          public java.util.Map<java.lang.String,Tap> getTrapsMap()

      Specified by:
        `getTrapsMap` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getTopologicalIterator

          public java.util.Iterator<Process> getTopologicalIterator()

      Specified by:
        `getTopologicalIterator` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getOrdinalTopologicalIterator

          public java.util.Iterator<Process> getOrdinalTopologicalIterator()

      Specified by:
        `getOrdinalTopologicalIterator` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getOrderedTopologicalIterator

          public java.util.Iterator<Process> getOrderedTopologicalIterator(java.util.Comparator<Process> comparator)

      Specified by:
        `getOrderedTopologicalIterator` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getElementGraphs

          public java.util.Set<ElementGraph> getElementGraphs()

      Specified by:
        `getElementGraphs` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getElementGraphs

          public java.util.List<ElementGraph> getElementGraphs(FlowElement flowElement)

      Specified by:
        `getElementGraphs` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getElementProcesses

          public java.util.List<Process> getElementProcesses(FlowElement flowElement)

      Specified by:
        `getElementProcesses` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getElementGraphs

          public java.util.List<ElementGraph> getElementGraphs(Scope scope)

      Specified by:
        `getElementGraphs` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getElementProcesses

          public java.util.List<Process> getElementProcesses(Scope scope)

      Specified by:
        `getElementProcesses` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getElementSourceProcesses

          public java.util.List<Process> getElementSourceProcesses(FlowElement flowElement)

      Specified by:
        `getElementSourceProcesses` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getElementSinkProcesses

          public java.util.List<Process> getElementSinkProcesses(FlowElement flowElement)

      Specified by:
        `getElementSinkProcesses` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getAllSourceElements

          public java.util.Set<FlowElement> getAllSourceElements()

      Specified by:
        `getAllSourceElements` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getAllSinkElements

          public java.util.Set<FlowElement> getAllSinkElements()

      Specified by:
        `getAllSinkElements` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getAnnotations

          public EnumMultiMap<FlowElement> getAnnotations()

      Specified by:
        `getAnnotations` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getDuplicatedElements

          public java.util.Set<FlowElement> getDuplicatedElements(ElementGraph elementGraph)

      All elements, from the given ElementGraph, that belong to two or more processes, that are not sink or source elements that connect processes.
      Specified by:
        `getDuplicatedElements` in interface `ProcessGraph<Process extends ProcessModel>`
      Returns:
        Set

    - #### getIdentityElementGraphs

          public java.util.Set<ElementGraph> getIdentityElementGraphs()

      Specified by:
        `getIdentityElementGraphs` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getIdentityProcesses

          public java.util.Set<Process> getIdentityProcesses()

      Returns a set of processes that perform no internal operations.

      for example if a FlowNode only has a Merge source and a GroupBy sink.
      Specified by:
        `getIdentityProcesses` in interface `ProcessGraph<Process extends ProcessModel>`
      Returns:

    - #### writeDOT

          public void writeDOT(java.lang.String filename)

      Method writeDOT writes this element graph to a DOT file for easy visualization and debugging.
      Specified by:
        `writeDOT` in interface `ProcessGraph<Process extends ProcessModel>`
      Parameters:
        `filename` - of type String

    - #### printProcessGraph

          protected void printProcessGraph(java.lang.String filename)

    - #### writeDOTNested

          public void writeDOTNested(java.lang.String filename,
                            ElementGraph graph)

      Specified by:
        `writeDOTNested` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### containsEdge

          public boolean containsEdge(Process sourceVertex,
                             Process targetVertex)

      Specified by:
        `containsEdge` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### removeAllEdges

          public boolean removeAllEdges(java.util.Collection<? extends ProcessEdge> edges)

      Specified by:
        `removeAllEdges` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### removeAllEdges

          public java.util.Set<ProcessEdge> removeAllEdges(Process sourceVertex,
                                                  Process targetVertex)

      Specified by:
        `removeAllEdges` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### removeAllVertices

          public boolean removeAllVertices(java.util.Collection<? extends Process> vertices)

      Specified by:
        `removeAllVertices` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getAllEdges

          public java.util.Set<ProcessEdge> getAllEdges(Process sourceVertex,
                                               Process targetVertex)

      Specified by:
        `getAllEdges` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getEdge

          public ProcessEdge getEdge(Process sourceVertex,
                            Process targetVertex)

      Specified by:
        `getEdge` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### addEdge

          public ProcessEdge addEdge(Process sourceVertex,
                            Process targetVertex)

      Specified by:
        `addEdge` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### addEdge

          public boolean addEdge(Process sourceVertex,
                        Process targetVertex,
                        ProcessEdge processEdge)

      Specified by:
        `addEdge` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getEdgeSource

          public Process getEdgeSource(ProcessEdge processEdge)

      Specified by:
        `getEdgeSource` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getEdgeTarget

          public Process getEdgeTarget(ProcessEdge processEdge)

      Specified by:
        `getEdgeTarget` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### containsEdge

          public boolean containsEdge(ProcessEdge processEdge)

      Specified by:
        `containsEdge` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### containsVertex

          public boolean containsVertex(Process process)

      Specified by:
        `containsVertex` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### edgeSet

          public java.util.Set<ProcessEdge> edgeSet()

      Specified by:
        `edgeSet` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### edgesOf

          public java.util.Set<ProcessEdge> edgesOf(Process vertex)

      Specified by:
        `edgesOf` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### inDegreeOf

          public int inDegreeOf(Process vertex)

      Specified by:
        `inDegreeOf` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### incomingEdgesOf

          public java.util.Set<ProcessEdge> incomingEdgesOf(Process vertex)

      Specified by:
        `incomingEdgesOf` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### outDegreeOf

          public int outDegreeOf(Process vertex)

      Specified by:
        `outDegreeOf` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### outgoingEdgesOf

          public java.util.Set<ProcessEdge> outgoingEdgesOf(Process vertex)

      Specified by:
        `outgoingEdgesOf` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### removeEdge

          public ProcessEdge removeEdge(Process sourceVertex,
                               Process targetVertex)

      Specified by:
        `removeEdge` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### removeEdge

          public boolean removeEdge(ProcessEdge processEdge)

      Specified by:
        `removeEdge` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### removeVertex

          public boolean removeVertex(Process process)

      Specified by:
        `removeVertex` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### vertexSet

          public java.util.Set<Process> vertexSet()

      Specified by:
        `vertexSet` in interface `ProcessGraph<Process extends ProcessModel>`

    - #### getEdgeWeight

          public double getEdgeWeight(ProcessEdge processEdge)

      Specified by:
        `getEdgeWeight` in interface `ProcessGraph<Process extends ProcessModel>`

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.