Class IoUringSocketChannel

    • Field Detail

      • active

        protected volatile boolean active
    • Constructor Detail

      • IoUringSocketChannel

        public IoUringSocketChannel()
    • Method Detail

      • remoteAddress

        public java.net.InetSocketAddress remoteAddress()
        Description copied from interface: Channel
        Returns the remote address where this channel is connected to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
        Specified by:
        remoteAddress in interface Channel
        Specified by:
        remoteAddress in interface SocketChannel
        Overrides:
        remoteAddress in class AbstractChannel
        Returns:
        the remote address of this channel. null if this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g. DatagramChannel, use DefaultAddressedEnvelope.recipient() to determine the origination of the received message as this method will return null.
      • localAddress

        public java.net.InetSocketAddress localAddress()
        Description copied from interface: Channel
        Returns the local address where this channel is bound to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.
        Specified by:
        localAddress in interface Channel
        Specified by:
        localAddress in interface SocketChannel
        Overrides:
        localAddress in class AbstractChannel
        Returns:
        the local address of this channel. null if this channel is not bound.
      • shutdown

        public final ChannelFuture shutdown()
        Description copied from interface: DuplexChannel
        Will shutdown the input and output sides of this channel.
        Specified by:
        shutdown in interface DuplexChannel
        Returns:
        will be completed when both shutdown operations complete.
      • shutdown

        public final ChannelFuture shutdown​(ChannelPromise promise)
        Description copied from interface: DuplexChannel
        Will shutdown the input and output sides of this channel.
        Specified by:
        shutdown in interface DuplexChannel
        Parameters:
        promise - will be completed when both shutdown operations complete.
        Returns:
        will be completed when both shutdown operations complete.
      • doShutdownOutput

        protected final void doShutdownOutput()
                                       throws java.lang.Exception
        Description copied from class: AbstractChannel
        Called when conditions justify shutting down the output portion of the channel. This may happen if a write operation throws an exception.
        Overrides:
        doShutdownOutput in class AbstractChannel
        Throws:
        java.lang.Exception
      • isOutputShutdown

        public final boolean isOutputShutdown()
        Specified by:
        isOutputShutdown in interface DuplexChannel
        See Also:
        Socket.isOutputShutdown()
      • isInputShutdown

        public final boolean isInputShutdown()
        Description copied from interface: DuplexChannel
        Returns true if and only if the remote peer shut down its output so that no more data is received from this channel. Note that the semantic of this method is different from that of Socket.shutdownInput() and Socket.isInputShutdown().
        Specified by:
        isInputShutdown in interface DuplexChannel
      • isShutdown

        public final boolean isShutdown()
        Description copied from interface: DuplexChannel
        Determine if both the input and output of this channel have been shutdown.
        Specified by:
        isShutdown in interface DuplexChannel
      • doRegister

        protected final void doRegister​(ChannelPromise promise)
        Description copied from class: AbstractChannel
        Is called after the Channel is registered with its EventLoop as part of the register process. Subclasses may override this method
        Parameters:
        promise - ChannelPromise that must be notified once done to continue the registration.
      • filterOutboundMessage

        protected java.lang.Object filterOutboundMessage​(java.lang.Object msg)
        Description copied from class: AbstractChannel
        Invoked when a new message is added to a ChannelOutboundBuffer of this AbstractChannel, so that the Channel implementation converts the message to another. (e.g. heap buffer -> direct buffer)
      • cancelOutstandingReads

        protected final void cancelOutstandingReads​(IoRegistration registration,
                                                    int numOutstandingReads)
        Cancel all outstanding reads
        Parameters:
        registration - the IoRegistration.
        numOutstandingReads - the number of outstanding reads, or -1 if multi-shot was used.
      • cancelOutstandingWrites

        protected final void cancelOutstandingWrites​(IoRegistration registration,
                                                     int numOutstandingWrites)
        Cancel all outstanding writes
        Parameters:
        registration - the IoRegistration.
        numOutstandingWrites - the number of outstanding writes.
      • socketIsEmpty

        protected boolean socketIsEmpty​(int flags)
        Return if the socket is guaranteed to be empty when the submitted io was executed and the completion event be created.
        Parameters:
        flags - the flags that were part of the completion
        Returns:
        true if empty.
      • submitAndRunNow

        protected void submitAndRunNow()
      • nextOpsId

        protected final short nextOpsId()
        Returns the next id that should be used when submitting IoUringIoOps.
        Returns:
        opsId
      • isOpen

        public final boolean isOpen()
        Description copied from interface: Channel
        Returns true if the Channel is open and may get active later
        Specified by:
        isOpen in interface Channel
      • isActive

        public boolean isActive()
        Description copied from interface: Channel
        Return true if the Channel is active and so connected.
        Specified by:
        isActive in interface Channel
      • newDirectBuffer

        protected final ByteBuf newDirectBuffer​(ByteBuf buf)
      • newDirectBuffer

        protected final ByteBuf newDirectBuffer​(java.lang.Object holder,
                                                ByteBuf buf)
      • doDisconnect

        protected void doDisconnect()
                             throws java.lang.Exception
        Description copied from class: AbstractChannel
        Disconnect this Channel from its remote peer
        Specified by:
        doDisconnect in class AbstractChannel
        Throws:
        java.lang.Exception
      • scheduleWriteIfNeeded

        protected void scheduleWriteIfNeeded​(ChannelOutboundBuffer in,
                                             boolean submitAndRunNow)
      • doBind

        protected void doBind​(java.net.SocketAddress local)
                       throws java.lang.Exception
        Description copied from class: AbstractChannel
        Bind the Channel to the SocketAddress
        Specified by:
        doBind in class AbstractChannel
        Throws:
        java.lang.Exception
      • checkResolvable

        protected static void checkResolvable​(java.net.InetSocketAddress addr)
      • localAddress0

        protected final java.net.SocketAddress localAddress0()
        Description copied from class: AbstractChannel
        Returns the SocketAddress which is bound locally.
        Specified by:
        localAddress0 in class AbstractChannel