Package bbflow

Class ff_queue_TCP<T>

java.lang.Object
bbflow.ff_queue<T>
bbflow.ff_queue_TCP<T>
Type Parameters:
T - Type of channels of the queue

public class ff_queue_TCP<T> extends ff_queue<T>
Queue extending ff_queue exploting a network channel. The channel is uni-directional and type of it must be specified during initialization (INPUT/OUTPUT)
  • Field Details

  • Constructor Details

    • ff_queue_TCP

      public ff_queue_TCP(int type, int connectionId, String host)
    • ff_queue_TCP

      public ff_queue_TCP(int type, int connectionId)
  • Method Details

    • put

      public void put(T i)
      Description copied from class: ff_queue
      Inserts the specified element at the tail of this queue, waiting if necessary for space to become available (if bounded)
      Overrides:
      put in class ff_queue<T>
      Parameters:
      i - Element to insert
    • setEOS

      public void setEOS()
      tell the Queue the end of stream reached
      Overrides:
      setEOS in class ff_queue<T>
    • offer

      public boolean offer(T i, long timeout, TimeUnit timeunit) throws InterruptedException
      Description copied from class: ff_queue
      Inserts the specified element at the tail of this queue, waiting if necessary up to the specified wait time for space to become available.
      Overrides:
      offer in class ff_queue<T>
      Parameters:
      i - element to insert
      timeout - time to wait
      timeunit - unit of the time to wait
      Returns:
      true or false
      Throws:
      InterruptedException
    • offer

      public boolean offer(T i)
      Description copied from class: ff_queue
      Inserts the specified element at the tail of this queue if it is possible to do so immediately without exceeding the queue's capacity, returning true upon success and false if this queue is full
      Overrides:
      offer in class ff_queue<T>
      Parameters:
      i - element to insert
      Returns:
      true or false