Class EpollDatagramChannelConfig

  • All Implemented Interfaces:
    io.netty.channel.ChannelConfig, io.netty.channel.socket.DatagramChannelConfig

    public final class EpollDatagramChannelConfig
    extends EpollChannelConfig
    implements io.netty.channel.socket.DatagramChannelConfig
    • Method Detail

      • getOptions

        public Map<io.netty.channel.ChannelOption<?>,​Object> getOptions()
        Specified by:
        getOptions in interface io.netty.channel.ChannelConfig
        Overrides:
        getOptions in class EpollChannelConfig
      • getOption

        public <T> T getOption​(io.netty.channel.ChannelOption<T> option)
        Specified by:
        getOption in interface io.netty.channel.ChannelConfig
        Overrides:
        getOption in class EpollChannelConfig
      • setOption

        public <T> boolean setOption​(io.netty.channel.ChannelOption<T> option,
                                     T value)
        Specified by:
        setOption in interface io.netty.channel.ChannelConfig
        Overrides:
        setOption in class EpollChannelConfig
      • setMessageSizeEstimator

        public EpollDatagramChannelConfig setMessageSizeEstimator​(io.netty.channel.MessageSizeEstimator estimator)
        Specified by:
        setMessageSizeEstimator in interface io.netty.channel.ChannelConfig
        Specified by:
        setMessageSizeEstimator in interface io.netty.channel.socket.DatagramChannelConfig
        Overrides:
        setMessageSizeEstimator in class EpollChannelConfig
      • setWriteBufferWaterMark

        public EpollDatagramChannelConfig setWriteBufferWaterMark​(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)
        Specified by:
        setWriteBufferWaterMark in interface io.netty.channel.ChannelConfig
        Specified by:
        setWriteBufferWaterMark in interface io.netty.channel.socket.DatagramChannelConfig
        Overrides:
        setWriteBufferWaterMark in class EpollChannelConfig
      • setAutoClose

        public EpollDatagramChannelConfig setAutoClose​(boolean autoClose)
        Specified by:
        setAutoClose in interface io.netty.channel.ChannelConfig
        Specified by:
        setAutoClose in interface io.netty.channel.socket.DatagramChannelConfig
        Overrides:
        setAutoClose in class io.netty.channel.DefaultChannelConfig
      • setAutoRead

        public EpollDatagramChannelConfig setAutoRead​(boolean autoRead)
        Specified by:
        setAutoRead in interface io.netty.channel.ChannelConfig
        Specified by:
        setAutoRead in interface io.netty.channel.socket.DatagramChannelConfig
        Overrides:
        setAutoRead in class EpollChannelConfig
      • setRecvByteBufAllocator

        public EpollDatagramChannelConfig setRecvByteBufAllocator​(io.netty.channel.RecvByteBufAllocator allocator)
        Specified by:
        setRecvByteBufAllocator in interface io.netty.channel.ChannelConfig
        Specified by:
        setRecvByteBufAllocator in interface io.netty.channel.socket.DatagramChannelConfig
        Overrides:
        setRecvByteBufAllocator in class EpollChannelConfig
      • setWriteSpinCount

        public EpollDatagramChannelConfig setWriteSpinCount​(int writeSpinCount)
        Specified by:
        setWriteSpinCount in interface io.netty.channel.ChannelConfig
        Specified by:
        setWriteSpinCount in interface io.netty.channel.socket.DatagramChannelConfig
        Overrides:
        setWriteSpinCount in class EpollChannelConfig
      • setAllocator

        public EpollDatagramChannelConfig setAllocator​(io.netty.buffer.ByteBufAllocator allocator)
        Specified by:
        setAllocator in interface io.netty.channel.ChannelConfig
        Specified by:
        setAllocator in interface io.netty.channel.socket.DatagramChannelConfig
        Overrides:
        setAllocator in class EpollChannelConfig
      • setConnectTimeoutMillis

        public EpollDatagramChannelConfig setConnectTimeoutMillis​(int connectTimeoutMillis)
        Specified by:
        setConnectTimeoutMillis in interface io.netty.channel.ChannelConfig
        Specified by:
        setConnectTimeoutMillis in interface io.netty.channel.socket.DatagramChannelConfig
        Overrides:
        setConnectTimeoutMillis in class EpollChannelConfig
      • getSendBufferSize

        public int getSendBufferSize()
        Specified by:
        getSendBufferSize in interface io.netty.channel.socket.DatagramChannelConfig
      • setSendBufferSize

        public EpollDatagramChannelConfig setSendBufferSize​(int sendBufferSize)
        Specified by:
        setSendBufferSize in interface io.netty.channel.socket.DatagramChannelConfig
      • getReceiveBufferSize

        public int getReceiveBufferSize()
        Specified by:
        getReceiveBufferSize in interface io.netty.channel.socket.DatagramChannelConfig
      • setReceiveBufferSize

        public EpollDatagramChannelConfig setReceiveBufferSize​(int receiveBufferSize)
        Specified by:
        setReceiveBufferSize in interface io.netty.channel.socket.DatagramChannelConfig
      • getTrafficClass

        public int getTrafficClass()
        Specified by:
        getTrafficClass in interface io.netty.channel.socket.DatagramChannelConfig
      • setTrafficClass

        public EpollDatagramChannelConfig setTrafficClass​(int trafficClass)
        Specified by:
        setTrafficClass in interface io.netty.channel.socket.DatagramChannelConfig
      • isReuseAddress

        public boolean isReuseAddress()
        Specified by:
        isReuseAddress in interface io.netty.channel.socket.DatagramChannelConfig
      • setReuseAddress

        public EpollDatagramChannelConfig setReuseAddress​(boolean reuseAddress)
        Specified by:
        setReuseAddress in interface io.netty.channel.socket.DatagramChannelConfig
      • isBroadcast

        public boolean isBroadcast()
        Specified by:
        isBroadcast in interface io.netty.channel.socket.DatagramChannelConfig
      • setBroadcast

        public EpollDatagramChannelConfig setBroadcast​(boolean broadcast)
        Specified by:
        setBroadcast in interface io.netty.channel.socket.DatagramChannelConfig
      • isLoopbackModeDisabled

        public boolean isLoopbackModeDisabled()
        Specified by:
        isLoopbackModeDisabled in interface io.netty.channel.socket.DatagramChannelConfig
      • setLoopbackModeDisabled

        public io.netty.channel.socket.DatagramChannelConfig setLoopbackModeDisabled​(boolean loopbackModeDisabled)
        Specified by:
        setLoopbackModeDisabled in interface io.netty.channel.socket.DatagramChannelConfig
      • getTimeToLive

        public int getTimeToLive()
        Specified by:
        getTimeToLive in interface io.netty.channel.socket.DatagramChannelConfig
      • setTimeToLive

        public EpollDatagramChannelConfig setTimeToLive​(int ttl)
        Specified by:
        setTimeToLive in interface io.netty.channel.socket.DatagramChannelConfig
      • getInterface

        public InetAddress getInterface()
        Specified by:
        getInterface in interface io.netty.channel.socket.DatagramChannelConfig
      • setInterface

        public EpollDatagramChannelConfig setInterface​(InetAddress interfaceAddress)
        Specified by:
        setInterface in interface io.netty.channel.socket.DatagramChannelConfig
      • getNetworkInterface

        public NetworkInterface getNetworkInterface()
        Specified by:
        getNetworkInterface in interface io.netty.channel.socket.DatagramChannelConfig
      • setNetworkInterface

        public EpollDatagramChannelConfig setNetworkInterface​(NetworkInterface networkInterface)
        Specified by:
        setNetworkInterface in interface io.netty.channel.socket.DatagramChannelConfig
      • isReusePort

        public boolean isReusePort()
        Returns true if the SO_REUSEPORT option is set.
      • setReusePort

        public EpollDatagramChannelConfig setReusePort​(boolean reusePort)
        Set the SO_REUSEPORT option on the underlying Channel. This will allow to bind multiple EpollSocketChannels to the same port and so accept connections with multiple threads. Be aware this method needs be called before Channel.bind(java.net.SocketAddress) to have any affect.
      • isIpTransparent

        public boolean isIpTransparent()
        Returns true if IP_TRANSPARENT is enabled, false otherwise.
      • isFreeBind

        public boolean isFreeBind()
        Returns true if IP_FREEBIND is enabled, false otherwise.
      • isIpRecvOrigDestAddr

        public boolean isIpRecvOrigDestAddr()
        Returns true if IP_RECVORIGDSTADDR is enabled, false otherwise.
      • isIpMulticastAll

        public boolean isIpMulticastAll()
        Returns true if IP_MULTICAST_ALL (or IPV6_MULTICAST_ALL for IPV6) is enabled, false otherwise.
      • setIpMulticastAll

        public EpollDatagramChannelConfig setIpMulticastAll​(boolean multicastAll)
        If true is used IP_MULTICAST_ALL is enabled (or IPV6_MULTICAST_ALL for IPV6), false for disable it. Default is enabled.
      • setMaxDatagramPayloadSize

        public EpollDatagramChannelConfig setMaxDatagramPayloadSize​(int maxDatagramSize)
        Set the maximum DatagramPacket size. This will be used to determine if recvmmsg should be used when reading from the underlying socket. When recvmmsg is used we may be able to read multiple DatagramPackets with one syscall and so greatly improve the performance. This number will be used to slice ByteBufs returned by the used RecvByteBufAllocator. You can use 0 to disable the usage of recvmmsg, any other bigger value will enable it.
      • getMaxDatagramPayloadSize

        public int getMaxDatagramPayloadSize()
        Get the maximum DatagramPacket size.
      • setUdpGro

        public EpollDatagramChannelConfig setUdpGro​(boolean gro)
        Enable / disable UDP_GRO.
        Parameters:
        gro - true if UDP_GRO should be enabled, false otherwise.
        Returns:
        this.
      • isUdpGro

        public boolean isUdpGro()
        Returns if UDP_GRO is enabled.
        Returns:
        true if enabled, false otherwise.
      • setMaxMessagesPerWrite

        public EpollDatagramChannelConfig setMaxMessagesPerWrite​(int maxMessagesPerWrite)
        Overrides:
        setMaxMessagesPerWrite in class io.netty.channel.DefaultChannelConfig