All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rabbitmq.client.impl.nio.NioQueue Maven / Gradle / Ivy

Go to download

The RabbitMQ Java client library allows Java applications to interface with RabbitMQ.

There is a newer version: 5.22.0
Show newest version
package com.rabbitmq.client.impl.nio;

/**
 * Contract to exchange frame between application threads and NIO thread.
 * 

* This is a simplified subset of {@link java.util.concurrent.BlockingQueue}. * This interface is considered a SPI and is likely to move between * minor and patch releases. * * @see NioParams * @since 4.9.0 */ public interface NioQueue { /** * Enqueue a frame, block if the queue is full. * * @param writeRequest * @return * @throws InterruptedException */ boolean offer(WriteRequest writeRequest) throws InterruptedException; /** * Get the current size of the queue. * * @return */ int size(); /** * Retrieves and removes the head of this queue, * or returns {@code null} if this queue is empty. * * @return the head of this queue, or {@code null} if this queue is empty */ WriteRequest poll(); /** * Returns {@code true} if the queue contains no element. * * @return {@code true} if the queue contains no element */ boolean isEmpty(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy