Class BlockingQueueNioQueue

java.lang.Object
com.rabbitmq.client.impl.nio.BlockingQueueNioQueue
All Implemented Interfaces:
NioQueue

public class BlockingQueueNioQueue extends Object implements NioQueue
Bridge between NioQueue and JDK's BlockingQueue.
Since:
5.5.0
See Also:
  • Constructor Details

  • Method Details

    • offer

      public boolean offer(WriteRequest writeRequest) throws InterruptedException
      Description copied from interface: NioQueue
      Enqueue a frame, block if the queue is full.
      Specified by:
      offer in interface NioQueue
      Parameters:
      writeRequest -
      Returns:
      Throws:
      InterruptedException
    • size

      public int size()
      Description copied from interface: NioQueue
      Get the current size of the queue.
      Specified by:
      size in interface NioQueue
      Returns:
    • poll

      public WriteRequest poll()
      Description copied from interface: NioQueue
      Retrieves and removes the head of this queue, or returns null if this queue is empty.
      Specified by:
      poll in interface NioQueue
      Returns:
      the head of this queue, or null if this queue is empty
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: NioQueue
      Returns true if the queue contains no element.
      Specified by:
      isEmpty in interface NioQueue
      Returns:
      true if the queue contains no element