Interface Node

All Superinterfaces:
Comparable<Node>
All Known Subinterfaces:
FlowIn<I>, FlowOut<O>, StreamIn<I>, StreamOut<O>
All Known Implementing Classes:
AbstractNode, BiNode, Join, NodeDecorator, OffsetNode, Pipe, Recipient, SimpleNode, Sink, Source, StreamAccumulator, StreamGenerator, StreamJoin, StreamPipe, StreamPipeline, StreamSink, StreamSource

public interface Node
extends Comparable<Node>
Author:
Pierre Lecerf ([email protected]) Created on 2020/03/01
  • Method Summary

    Modifier and Type Method Description
    Node after​(Node other)
    Requests for the current node to be executed after the provided node.
    Node after​(Collection<Node> others)
    Requests for the current node to be executed after the provided nodes.
    default int compareTo​(Node o)  
    List<Node> getDownstream()
    Returns the list of downstream nodes, ie. nodes which require the current node's output in order to be executed.
    List<Node> getRequiredBy()
    Returns the list of downstream requirements over the current node, ie. nodes which cannot be executed until the current node is.
    List<Node> getRequirements()
    Returns the list of upstream requirement nodes, ie. nodes which need to be executed before, but which outputs aren't required for execution.
    String getUid()
    Returns a unique identifier for the node within a flow DAG.
    List<Node> getUpstream()
    Returns the list of upstream nodes, ie. nodes which output is required in order to execute the current node.
  • Method Details

    • getUid

      String getUid()
      Returns a unique identifier for the node within a flow DAG.
      Returns:
      the node UID
    • getDownstream

      List<Node> getDownstream()
      Returns the list of downstream nodes, ie. nodes which require the current node's output in order to be executed.
      Returns:
      the list of downstream nodes
    • getUpstream

      List<Node> getUpstream()
      Returns the list of upstream nodes, ie. nodes which output is required in order to execute the current node. For Source nodes, this should be empty. For Pipe and Sink nodes, this should be a list of size 1. For Join nodes, this should be a list of size 2.
      Returns:
      the list of upstream nodes
    • getRequiredBy

      List<Node> getRequiredBy()
      Returns the list of downstream requirements over the current node, ie. nodes which cannot be executed until the current node is. There can be any number of requirements for a given node.
      Returns:
      the list of downstream requirement nodes
    • getRequirements

      List<Node> getRequirements()
      Returns the list of upstream requirement nodes, ie. nodes which need to be executed before, but which outputs aren't required for execution. There can be any number of requirements for a given node.
      Returns:
      the list of upstream requirement nodes
    • after

      Node after​(Node other)
      Requests for the current node to be executed after the provided node. It should result in the current node having a requirement towards the provided node.
      Parameters:
      other - the node after which it has to be executed
      Returns:
      the current node
      See Also:
      getRequirements()
    • after

      Node after​(Collection<Node> others)
      Requests for the current node to be executed after the provided nodes. It should result in the current node having a requirement towards each node in the provided collection.
      Parameters:
      others - the nodes after which it has to be executed
      Returns:
      the current node
      See Also:
      getRequirements()
    • compareTo

      default int compareTo​(Node o)
      Specified by:
      compareTo in interface Comparable<Node>