Interface QueueBase<T>

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
DistributedDelayQueue, DistributedIdQueue, DistributedPriorityQueue, DistributedQueue

public interface QueueBase<T> extends Closeable
  • Method Details

    • start

      void start() throws Exception
      Start the queue. No other methods work until this is called
      Exception - startup errors
    • getPutListenerContainer

      Listenable<QueuePutListener<T>> getPutListenerContainer()
      Return the manager for put listeners
      put listener container
    • setErrorMode

      void setErrorMode(ErrorMode newErrorMode)
      Used when the queue is created with a QueueBuilder.lockPath(String). Determines the behavior when the queue consumer throws an exception
      newErrorMode - the new error mode (the default is ErrorMode.REQUEUE
    • flushPuts

      boolean flushPuts(long waitTime, TimeUnit timeUnit) throws InterruptedException
      Wait until any pending puts are committed
      waitTime - max wait time
      timeUnit - time unit
      true if the flush was successful, false if it timed out first
      InterruptedException - if thread was interrupted
    • getLastMessageCount

      int getLastMessageCount()
      Return the most recent message count from the queue. This is useful for debugging/information purposes only.
      count (can be 0)