Interface Dequeuer


public interface Dequeuer
A Dequeuer is used for dequeueing tuples from a specific stream.
Since:
6.6
  • Field Details

  • Method Details

    • getStreamProperties

      StreamProperties getStreamProperties()
      Get the StreamProperties for the associated stream.
      Returns:
      Stream properties
    • getSchema

      Schema getSchema()
      Get the Schema for the associated stream.
      Equivalent to getStreamProperties().getSchema()
      Returns:
      Schema
    • dequeue

      List<Tuple> dequeue(int numTuples) throws StreamBaseException
      Try to dequeue tuples with the DEFAULT_TIMEOUT and DEFAULT_TIMEOUT_UNIT
      • if numTuples == 0 will return immediately
      • if numTuples < 0 will wait the maximum timeout before returning
      Parameters:
      numTuples - the number of tuples to dequeue
      Returns:
      all of the tuples dequeued before the timeout, possibly an empty list
      Throws:
      StreamBaseException - Dequeue failed
    • dequeue

      List<Tuple> dequeue(int numTuples, long timeout, TimeUnit timeUnit) throws StreamBaseException
      Try to dequeue tuples within a provided timeout.
      • if numTuples == 0 will return immediately
      • if numTuples < 0 will wait the maximum timeout before returning
      Parameters:
      numTuples - the number of tuples to dequeue
      timeout - the maximum time to wait
      timeUnit - the time unit of timeout argument
      Returns:
      all of the tuples dequeued before the timeout, possibly an empty list
      Throws:
      StreamBaseException - Dequeue failed
    • drain

      void drain() throws StreamBaseException
      Drain any tuples that are currently in flight in the server. This method should not normally be called, but is provided to speed up things that expect no output.
      Throws:
      StreamBaseException - Drain failed