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 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.
-
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 returnsnull
if this queue is empty.- Returns:
- the head of this queue, or
null
if this queue is empty
-
isEmpty
boolean isEmpty()Returnstrue
if the queue contains no element.- Returns:
true
if the queue contains no element
-