Package com.rabbitmq.client.impl.nio
Interface NioQueue
- All Known Implementing Classes:
BlockingQueueNioQueue
public interface NioQueue
Contract to exchange frame between application threads and NIO thread.
This is a simplified subset of BlockingQueue.
This interface is considered a SPI and is likely to move between
minor and patch releases.
- Since:
- 5.5.0
- See Also:
-
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.
-
Method Details
-
offer
Enqueue a frame, block if the queue is full.- Parameters:
writeRequest-- Returns:
- Throws:
InterruptedException
-
size
int size()Get the current size of the queue.- Returns:
-
poll
WriteRequest poll()Retrieves and removes the head of this queue, or returnsnullif this queue is empty.- Returns:
- the head of this queue, or
nullif this queue is empty
-
isEmpty
boolean isEmpty()Returnstrueif the queue contains no element.- Returns:
trueif the queue contains no element
-