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:
    4.9.0
    See Also:
    NioParams
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isEmpty()
      Returns true if the queue contains no element.
      boolean offer​(WriteRequest writeRequest)
      Enqueue a frame, block if the queue is full.
      WriteRequest poll()
      Retrieves and removes the head of this queue, or returns null if this queue is empty.
      int size()
      Get the current size of the queue.
    • Method Detail

      • 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