Package bbflow

Class ff_node<T,U>

java.lang.Object
bbflow.block<T,U>
bbflow.ff_node<T,U>
Type Parameters:
T - Custom type of the channels
Direct Known Subclasses:
ff_all2all, ff_comb, ff_farm, ff_pipeline

public class ff_node<T,U> extends block<T,U>
Fundamental building block rapresenting a node Implemented and used by other building blocks Support multiple input and output channels Single lock for all input channels and a single lock for all output channels
  • Field Details

    • mynode

      public node mynode
  • Constructor Details

    • ff_node

      public ff_node()
      default constructor for different blocks extending ff_node
    • ff_node

      public ff_node(defaultJob<T,U> job)
      default constructor
      Parameters:
      job - generic Runnable of type default Job extending Runnable
    • ff_node

      public ff_node(ff_node<T,U> customEmitterR)
  • Method Details

    • preload

      public static void preload()
    • addInputChannel

      public void addInputChannel(ff_queue<T> input)
      add a Input channel to the bbflow.ff_node. LinkedList is O(1) adding/removing first element
      Overrides:
      addInputChannel in class block<T,U>
      Parameters:
      input - input channel
    • addOutputChannel

      public void addOutputChannel(ff_queue<U> output)
      add a Output channel to the bbflow.ff_node LinkedList is O(1) adding/removing first element
      Overrides:
      addOutputChannel in class block<T,U>
      Parameters:
      output - output channel
    • removeInputChannel

      public boolean removeInputChannel(int index)
      add a Input channel to the bbflow.ff_node. LinkedList is O(1) adding/removing first element
      Parameters:
      index - index of channel to remove
      Returns:
    • removeOutputChannel

      public boolean removeOutputChannel(int index)
      add a Output channel to the bbflow.ff_node LinkedList is O(1) adding/removing first element
      Parameters:
      index - index of channel to remove
      Returns:
    • start

      public void start()
      Overrides:
      start in class block<T,U>
    • join

      public void join()
      default join function
      Overrides:
      join in class block<T,U>
    • getOutputChannel

      public ff_queue<U> getOutputChannel(int index)
      get output channel
      Parameters:
      index - get output channel at index. Indexes starting from 0
      Returns:
      return channel retrieved
    • getInputChannel

      public ff_queue<T> getInputChannel(int index)
      get input channel
      Parameters:
      index - get input channel at index. Indexes starting from 0
      Returns:
      return channel retrieved