Class AbstractNioChannel<P extends Channel,​L extends SocketAddress,​R extends SocketAddress>

    • Field Detail

      • readInterestOp

        protected final int readInterestOp
    • Method Detail

      • isOpen

        public boolean isOpen()
        Description copied from interface: Channel
        Returns true if the Channel is open and may get active later
      • selectionKey

        protected SelectionKey selectionKey()
        Return the current SelectionKey or null if the underlying channel was not registered with the Selector yet.
      • isReadPending

        @Deprecated
        protected boolean isReadPending()
        Deprecated.
        No longer supported. No longer supported.
      • setReadPending

        @Deprecated
        protected void setReadPending​(boolean readPending)
        Deprecated.
        Use clearReadPending() if appropriate instead. No longer supported.
      • clearReadPending

        protected final void clearReadPending()
        Set read pending to false.
      • removeReadOp

        protected final void removeReadOp()
      • newDirectBuffer

        protected final Buffer newDirectBuffer​(Buffer buf)
        Allocates a new off-heap copy of the given buffer, unless the cost of doing so is too high. The given buffer is closed if a copy is created, or returned directly.
        Parameters:
        buf - The buffer to copy.
        Returns:
        Probably an off-heap copy of the given buffer.
      • newDirectBuffer

        protected final Buffer newDirectBuffer​(Resource<?> holder,
                                               Buffer buf)
        Allocates a new off-heap copy of the given buffer, unless the cost of doing so is too high. The given holder is closed regardless.
        Parameters:
        buf - The buffer to copy.
        Returns:
        Probably an off-heap copy of the given buffer.
      • readNow

        protected abstract void readNow()