Package com.rabbitmq.client.impl.nio
Class BlockingQueueNioQueue
- java.lang.Object
-
- com.rabbitmq.client.impl.nio.BlockingQueueNioQueue
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.BlockingQueue<WriteRequest>
delegate
private int
writeEnqueuingTimeoutInMs
-
Constructor Summary
Constructors Constructor Description BlockingQueueNioQueue(java.util.concurrent.BlockingQueue<WriteRequest> delegate, int writeEnqueuingTimeoutInMs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEmpty()
Returnstrue
if the queue contains no element.boolean
offer(WriteRequest writeRequest)
Enqueue a frame, block if the queue is full.WriteRequest
poll()
Retrieves and removes the head of this queue, or returnsnull
if this queue is empty.int
size()
Get the current size of the queue.
-
-
-
Field Detail
-
delegate
private final java.util.concurrent.BlockingQueue<WriteRequest> delegate
-
writeEnqueuingTimeoutInMs
private final int writeEnqueuingTimeoutInMs
-
-
Constructor Detail
-
BlockingQueueNioQueue
public BlockingQueueNioQueue(java.util.concurrent.BlockingQueue<WriteRequest> delegate, int writeEnqueuingTimeoutInMs)
-
-
Method Detail
-
offer
public boolean offer(WriteRequest writeRequest) throws java.lang.InterruptedException
Description copied from interface:NioQueue
Enqueue a frame, block if the queue is full.
-
size
public int size()
Description copied from interface:NioQueue
Get the current size of the queue.
-
poll
public WriteRequest poll()
Description copied from interface:NioQueue
Retrieves and removes the head of this queue, or returnsnull
if this queue is empty.
-
-