Package bbflow

Class pipeline_generic<T,U,V>

java.lang.Object
bbflow.block<T,V>
bbflow.pipeline_generic<T,U,V>

public class pipeline_generic<T,U,V> extends block<T,V>
Pipeline building block allows auto-connection between all types of ff_blocks
  • Field Details

  • Constructor Details

    • pipeline_generic

      public pipeline_generic(int bufferSize)
  • Method Details

    • preload

      public static void preload()
    • createPipe

      public void createPipe(block<T,U> b1, block<U,V> b2, boolean BLOCKING, boolean BOUNDED)
      connect 1-1 the two blocks and add to pipeline
      Parameters:
      b1 - first block
      b2 - second block
      BLOCKING - type of channel
      BOUNDED - type of channel
    • connect

      public void connect(block<T,U> b1, block<U,V> b2, boolean BLOCKING, boolean BOUNDED)
      connect 1-1 the two blocks
      Parameters:
      b1 - first block
      b2 - second block
      BLOCKING - type of channel
      BOUNDED - type of channel
    • createPipe

      public void createPipe(block<T,U> b1, block<U,V> b2)
      connect 1-1 the two blocks and add to pipeline
      Parameters:
      b1 - first block
      b2 - second block
    • createPipeMulti

      public void createPipeMulti(block<T,U> b1, block<U,V> b2, boolean BLOCKING, boolean BOUNDED, byte MULTI)
      connect two blocks and add to pipeline. See ff_pipeline for reference
      Parameters:
      b1 - first block
      b2 - second block
      BLOCKING - type of channel
      BOUNDED - type of channel
      MULTI - TYPE_1_1, TYPE_1_N, TYPE_Nx1, TYPE_N_N, TYPE_NxM
    • connectPipeMulti

      public void connectPipeMulti(block<T,U> b1, block<U,V> b2, boolean BLOCKING, boolean BOUNDED, byte MULTI)
      connect two blocks. See ff_pipeline for reference
      Parameters:
      b1 - first block
      b2 - second block
      BLOCKING - type of channel
      BOUNDED - type of channel
      MULTI - TYPE_1_1, TYPE_1_N, TYPE_Nx1, TYPE_N_N, TYPE_NxM
    • createPipeMulti

      public void createPipeMulti(block<T,U> b1, block<U,V> b2, byte MULTI)
      connect two blocks and add to pipeline. See ff_pipeline for reference
      Parameters:
      b1 - first block
      b2 - second block
      MULTI - TYPE_1_1, TYPE_1_N, TYPE_Nx1, TYPE_N_N, TYPE_NxM
    • addInputChannel

      public void addInputChannel(ff_queue<T> input)
      add input channel to first block in pipe
      Overrides:
      addInputChannel in class block<T,V>
      Parameters:
      input -
    • addOutputChannel

      public void addOutputChannel(ff_queue<V> output)
      add output channel to the last element in pipe
      Overrides:
      addOutputChannel in class block<T,V>
      Parameters:
      output -
    • start

      public void start()
      start all blocks in pipe
      Overrides:
      start in class block<T,V>
    • join

      public void join()
      wait end of all blocks in pipe
      Overrides:
      join in class block<T,V>
    • getFirstFarm

      public ff_farm getFirstFarm()
      get first farm of the pipeline
      Returns:
      first farm or null
    • getLastFarm

      public ff_farm getLastFarm()
      get last farm of pipeline
      Returns:
      last farm or null
    • appendBlock

      public void appendBlock(block<Object,Object> newblock, byte MULTI)