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
ConstructorsConstructorDescriptionBlockingQueueNioQueue(BlockingQueue<WriteRequest> delegate, int writeEnqueuingTimeoutInMs) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty()Returnstrueif the queue contains no element.booleanoffer(WriteRequest writeRequest) Enqueue a frame, block if the queue is full.poll()Retrieves and removes the head of this queue, or returnsnullif this queue is empty.intsize()Get the current size of the queue.
-
Constructor Details
-
BlockingQueueNioQueue
-
-
Method Details
-
offer
Description copied from interface:NioQueueEnqueue a frame, block if the queue is full.- Specified by:
offerin interfaceNioQueue- Parameters:
writeRequest-- Returns:
- Throws:
InterruptedException
-
size
public int size()Description copied from interface:NioQueueGet the current size of the queue. -
poll
Description copied from interface:NioQueueRetrieves and removes the head of this queue, or returnsnullif this queue is empty. -
isEmpty
public boolean isEmpty()Description copied from interface:NioQueueReturnstrueif the queue contains no element.
-