Package com.rabbitmq.client.impl.nio
Class BlockingQueueNioQueue
java.lang.Object
com.rabbitmq.client.impl.nio.BlockingQueueNioQueue
- All Implemented Interfaces:
NioQueue
Bridge between
NioQueue
and JDK's BlockingQueue
.- Since:
- 5.5.0
- See Also:
-
Constructor Summary
ConstructorDescriptionBlockingQueueNioQueue
(BlockingQueue<WriteRequest> delegate, int writeEnqueuingTimeoutInMs) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isEmpty()
Returnstrue
if the queue contains no element.boolean
offer
(WriteRequest writeRequest) Enqueue a frame, block if the queue is full.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.
-
Constructor Details
-
BlockingQueueNioQueue
-
-
Method Details
-
offer
Description copied from interface:NioQueue
Enqueue a frame, block if the queue is full.- Specified by:
offer
in interfaceNioQueue
- Parameters:
writeRequest
-- Returns:
- Throws:
InterruptedException
-
size
public int size()Description copied from interface:NioQueue
Get the current size of the queue. -
poll
Description copied from interface:NioQueue
Retrieves and removes the head of this queue, or returnsnull
if this queue is empty. -
isEmpty
public boolean isEmpty()Description copied from interface:NioQueue
Returnstrue
if the queue contains no element.
-