Class IoUringDatagramChannel

    • Field Detail

      • active

        protected volatile boolean active
    • Constructor Detail

      • IoUringDatagramChannel

        public IoUringDatagramChannel()
        Create a new instance which selects the SocketProtocolFamily to use depending on the Operation Systems default which will be chosen.
      • IoUringDatagramChannel

        public IoUringDatagramChannel​(SocketProtocolFamily family)
        Create a new instance using the given SocketProtocolFamily. If null is used it will depend on the Operation Systems default which will be chosen.
      • IoUringDatagramChannel

        public IoUringDatagramChannel​(int fd)
        Create a new instance which selects the SocketProtocolFamily to use depending on the Operation Systems default which will be chosen.
    • 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 DatagramChannel
        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 DatagramChannel
        Overrides:
        localAddress in class AbstractChannel
        Returns:
        the local address of this channel. null if this channel is not bound.
      • 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
      • joinGroup

        public ChannelFuture joinGroup​(java.net.InetSocketAddress multicastAddress,
                                       java.net.NetworkInterface networkInterface)
        Description copied from interface: DatagramChannel
        Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes.
        Specified by:
        joinGroup in interface DatagramChannel
      • joinGroup

        public ChannelFuture joinGroup​(java.net.InetAddress multicastAddress,
                                       java.net.NetworkInterface networkInterface,
                                       java.net.InetAddress source)
        Description copied from interface: DatagramChannel
        Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes.
        Specified by:
        joinGroup in interface DatagramChannel
      • joinGroup

        public ChannelFuture joinGroup​(java.net.InetAddress multicastAddress,
                                       java.net.NetworkInterface networkInterface,
                                       java.net.InetAddress source,
                                       ChannelPromise promise)
        Description copied from interface: DatagramChannel
        Joins the specified multicast group at the specified interface and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
        Specified by:
        joinGroup in interface DatagramChannel
      • leaveGroup

        public ChannelFuture leaveGroup​(java.net.InetSocketAddress multicastAddress,
                                        java.net.NetworkInterface networkInterface)
        Description copied from interface: DatagramChannel
        Leaves a multicast group on a specified local interface and notifies the ChannelFuture once the operation completes.
        Specified by:
        leaveGroup in interface DatagramChannel
      • leaveGroup

        public ChannelFuture leaveGroup​(java.net.InetAddress multicastAddress,
                                        java.net.NetworkInterface networkInterface,
                                        java.net.InetAddress source)
        Description copied from interface: DatagramChannel
        Leave the specified multicast group at the specified interface using the specified source and notifies the ChannelFuture once the operation completes.
        Specified by:
        leaveGroup in interface DatagramChannel
      • leaveGroup

        public ChannelFuture leaveGroup​(java.net.InetAddress multicastAddress,
                                        java.net.NetworkInterface networkInterface,
                                        java.net.InetAddress source,
                                        ChannelPromise promise)
        Description copied from interface: DatagramChannel
        Leave the specified multicast group at the specified interface using the specified source and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
        Specified by:
        leaveGroup in interface DatagramChannel
      • block

        public ChannelFuture block​(java.net.InetAddress multicastAddress,
                                   java.net.NetworkInterface networkInterface,
                                   java.net.InetAddress sourceToBlock)
        Description copied from interface: DatagramChannel
        Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
        Specified by:
        block in interface DatagramChannel
      • block

        public ChannelFuture block​(java.net.InetAddress multicastAddress,
                                   java.net.NetworkInterface networkInterface,
                                   java.net.InetAddress sourceToBlock,
                                   ChannelPromise promise)
        Description copied from interface: DatagramChannel
        Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
        Specified by:
        block in interface DatagramChannel
      • block

        public ChannelFuture block​(java.net.InetAddress multicastAddress,
                                   java.net.InetAddress sourceToBlock)
        Description copied from interface: DatagramChannel
        Block the given sourceToBlock address for the given multicastAddress and notifies the ChannelFuture once the operation completes. The given ChannelFuture will be notified and also returned.
        Specified by:
        block in interface DatagramChannel
      • doBind

        protected void doBind​(java.net.SocketAddress localAddress)
                       throws java.lang.Exception
        Description copied from class: AbstractChannel
        Bind the Channel to the SocketAddress
        Throws:
        java.lang.Exception
      • 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)
      • doDisconnect

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

        protected void doClose()
                        throws java.lang.Exception
        Description copied from class: AbstractChannel
        Close the Channel
        Throws:
        java.lang.Exception
      • isSegmentedDatagramPacketSupported

        public static boolean isSegmentedDatagramPacketSupported()
        Returns true if the usage of SegmentedDatagramPacket is supported.
        Returns:
        true if supported, false otherwise.
      • cancelOutstandingReads

        protected 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 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.
      • 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
      • newDirectBuffer

        protected final ByteBuf newDirectBuffer​(ByteBuf buf)
      • newDirectBuffer

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

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

        protected void submitAndRunNow()
      • 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