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 Type
    Method
    Description
    boolean
    Returns true if the queue contains no element.
    boolean
    offer(WriteRequest writeRequest)
    Enqueue a frame, block if the queue is full.
    Retrieves and removes the head of this queue, or returns null if this queue is empty.
    int
    Get the current size of the queue.
  • Method Details

    • offer

      boolean offer(WriteRequest writeRequest) throws InterruptedException
      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 returns null if this queue is empty.
      Returns:
      the head of this queue, or null if this queue is empty
    • isEmpty

      boolean isEmpty()
      Returns true if the queue contains no element.
      Returns:
      true if the queue contains no element