Class AbstractIoUringChannel.AbstractUringUnsafe

    • Constructor Detail

      • AbstractUringUnsafe

        protected AbstractUringUnsafe()
    • Method Detail

      • scheduleWriteSingle

        protected abstract int scheduleWriteSingle​(java.lang.Object msg)
        Schedule the write of a single message and returns the number of writeComplete(byte, int, int, long) calls that are expected because of the scheduled write.
      • handle

        public final void handle​(IoRegistration registration,
                                 IoEvent ioEvent)
        Description copied from interface: IoHandle
        Be called once there is something to handle.
        Specified by:
        handle in interface IoHandle
        Parameters:
        registration - the IoRegistration for this IoHandle.
        ioEvent - the IoEvent that must be handled. The IoEvent is only valid while this method is executed and so must not escape it.
      • handleDelayedClosed

        private void handleDelayedClosed()
      • pollAddComplete

        private void pollAddComplete​(int res,
                                     int flags,
                                     short data)
      • cancelOps

        private boolean cancelOps​(boolean cancelConnect)
      • canCloseNow

        private boolean canCloseNow()
      • canCloseNow0

        protected boolean canCloseNow0()
      • closeNow

        private void closeNow()
      • fulfillConnectPromise

        private void fulfillConnectPromise​(ChannelPromise promise,
                                           java.lang.Throwable cause)
      • fulfillConnectPromise

        private void fulfillConnectPromise​(ChannelPromise promise,
                                           boolean wasActive)
      • shutdownInput

        final void shutdownInput​(boolean allDataRead)
      • fireEventAndClose

        private void fireEventAndClose​(java.lang.Object evt)
      • schedulePollIn

        final void schedulePollIn()
      • isReadMultishot

        protected final boolean isReadMultishot()
      • readComplete

        private void readComplete​(byte op,
                                  int res,
                                  int flags,
                                  short data)
      • readComplete0

        protected abstract void readComplete0​(byte op,
                                              int res,
                                              int flags,
                                              short data,
                                              int outstandingCompletes)
        Called once a read was completed.
      • pollRdHup

        private void pollRdHup​(int res)
        Called once POLLRDHUP event is ready to be processed
      • pollIn

        private void pollIn​(int res,
                            int flags,
                            short data)
        Called once POLLIN event is ready to be processed
      • scheduleFirstReadIfNeeded

        private void scheduleFirstReadIfNeeded()
      • scheduleFirstRead

        private void scheduleFirstRead()
      • scheduleRead

        protected final void scheduleRead​(boolean first)
      • scheduleRead0

        protected abstract int scheduleRead0​(boolean first,
                                             boolean socketIsEmpty)
        Schedule a read and returns the number of readComplete(byte, int, int, short) calls that are expected because of the scheduled read.
        Parameters:
        first - true if this is the first read of a read loop.
        socketIsEmpty - true if the socket is guaranteed to be empty, false otherwise.
        Returns:
        the number of readComplete(byte, int, int, short) calls expected or -1 if readComplete(byte, int, int, short) is called until the read is cancelled (multi-shot).
      • pollOut

        private void pollOut​(int res)
        Called once POLLOUT event is ready to be processed
        Parameters:
        res - the result.
      • writeComplete

        private void writeComplete​(byte op,
                                   int res,
                                   int flags,
                                   long data)
        Called once a write was completed.
        Parameters:
        op - the op code.
        res - the result.
        flags - the flags.
        data - the data that was passed when submitting the op.
      • writeComplete0

        abstract boolean writeComplete0​(byte op,
                                        int res,
                                        int flags,
                                        long data,
                                        int outstanding)
        Called once a write was completed.
        Parameters:
        op - the op code
        res - the result.
        flags - the flags.
        data - the data that was passed when submitting the op.
        outstanding - the outstanding write completions.
      • cancelComplete0

        void cancelComplete0​(byte op,
                             int res,
                             int flags,
                             short data)
        Called once a cancel was completed.
        Parameters:
        op - the op code
        res - the result.
        flags - the flags.
        data - the data that was passed when submitting the op.
      • connectComplete

        void connectComplete​(byte op,
                             int res,
                             int flags,
                             long data)
        Called once a connect was completed.
        Parameters:
        op - the op code.
        res - the result.
        flags - the flags.
        data - the data that was passed when submitting the op.
      • connect

        public void connect​(java.net.SocketAddress remoteAddress,
                            java.net.SocketAddress localAddress,
                            ChannelPromise promise)
        Description copied from interface: Channel.Unsafe
        Connect the Channel of the given ChannelFuture with the given remote SocketAddress. If a specific local SocketAddress should be used it need to be given as argument. Otherwise just pass null to it. The ChannelPromise will get notified once the connect operation was complete.
        Specified by:
        connect in interface Channel.Unsafe
      • fillTFOInitData

        private void fillTFOInitData​(MsgHdrMemory hdr,
                                     java.net.InetSocketAddress inetSocketAddress,
                                     ByteBuf initialData)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception