Class PendingWriteQueue


  • public final class PendingWriteQueue
    extends Object
    A queue of write operations which are pending for later execution. It also updates the writability of the associated Channel, so that the pending write operations are also considered to determine the writability.
    • Constructor Detail

      • PendingWriteQueue

        public PendingWriteQueue​(Channel channel)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Returns true if there are no pending write operations left in this queue.
      • size

        public int size()
        Returns the number of pending write operations.
      • bytes

        public long bytes()
        Returns the total number of bytes that are pending because of pending messages. This is only an estimate so it should only be treated as a hint.
      • removeAndFailAll

        public void removeAndFailAll​(Throwable cause)
        Remove all pending write operation and fail them with the given Throwable. The message will be released via ReferenceCountUtil.safeRelease(Object).
      • removeAndFail

        public void removeAndFail​(Throwable cause)
        Remove a pending write operation and fail it with the given Throwable. The message will be released via ReferenceCountUtil.safeRelease(Object).
      • remove

        public ChannelPromise remove()
        Removes a pending write operation and release it's message via ReferenceCountUtil.safeRelease(Object).
        Returns:
        ChannelPromise of the pending write or null if the queue is empty.
      • current

        public Object current()
        Return the current message or null if empty.