Class IOUringSocketChannelConfig

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

    public final class IOUringSocketChannelConfig
    extends io.netty.channel.DefaultChannelConfig
    implements io.netty.channel.socket.SocketChannelConfig
    • Field Detail

      • allowHalfClosure

        private volatile boolean allowHalfClosure
      • tcpFastopen

        private volatile boolean tcpFastopen
    • Constructor Detail

      • IOUringSocketChannelConfig

        IOUringSocketChannelConfig​(io.netty.channel.Channel channel)
    • Method Detail

      • getOptions

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

        public <T> T getOption​(io.netty.channel.ChannelOption<T> option)
        Specified by:
        getOption in interface io.netty.channel.ChannelConfig
        Overrides:
        getOption in class io.netty.channel.DefaultChannelConfig
      • 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 io.netty.channel.DefaultChannelConfig
      • getSendBufferSize

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

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

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

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

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

        public boolean isTcpNoDelay()
        Specified by:
        isTcpNoDelay in interface io.netty.channel.socket.SocketChannelConfig
      • isTcpCork

        public boolean isTcpCork()
        Get the TCP_CORK option on the socket. See man 7 tcp for more details.
      • getSoBusyPoll

        public int getSoBusyPoll()
        Get the SO_BUSY_POLL option on the socket. See man 7 tcp for more details.
      • getTcpNotSentLowAt

        public long getTcpNotSentLowAt()
        Get the TCP_NOTSENT_LOWAT option on the socket. See man 7 tcp for more details.
        Returns:
        value is a uint32_t
      • getTcpKeepIdle

        public int getTcpKeepIdle()
        Get the TCP_KEEPIDLE option on the socket. See man 7 tcp for more details.
      • getTcpKeepIntvl

        public int getTcpKeepIntvl()
        Get the TCP_KEEPINTVL option on the socket. See man 7 tcp for more details.
      • getTcpKeepCnt

        public int getTcpKeepCnt()
        Get the TCP_KEEPCNT option on the socket. See man 7 tcp for more details.
      • getTcpUserTimeout

        public int getTcpUserTimeout()
        Get the TCP_USER_TIMEOUT option on the socket. See man 7 tcp for more details.
      • setKeepAlive

        public IOUringSocketChannelConfig setKeepAlive​(boolean keepAlive)
        Specified by:
        setKeepAlive in interface io.netty.channel.socket.SocketChannelConfig
      • setPerformancePreferences

        public IOUringSocketChannelConfig setPerformancePreferences​(int connectionTime,
                                                                    int latency,
                                                                    int bandwidth)
        Specified by:
        setPerformancePreferences in interface io.netty.channel.socket.SocketChannelConfig
      • setReceiveBufferSize

        public IOUringSocketChannelConfig setReceiveBufferSize​(int receiveBufferSize)
        Specified by:
        setReceiveBufferSize in interface io.netty.channel.socket.SocketChannelConfig
      • setReuseAddress

        public IOUringSocketChannelConfig setReuseAddress​(boolean reuseAddress)
        Specified by:
        setReuseAddress in interface io.netty.channel.socket.SocketChannelConfig
      • setSendBufferSize

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

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

        public IOUringSocketChannelConfig setSoLinger​(int soLinger)
        Specified by:
        setSoLinger in interface io.netty.channel.socket.SocketChannelConfig
      • setTcpNoDelay

        public IOUringSocketChannelConfig setTcpNoDelay​(boolean tcpNoDelay)
        Specified by:
        setTcpNoDelay in interface io.netty.channel.socket.SocketChannelConfig
      • setTcpCork

        public IOUringSocketChannelConfig setTcpCork​(boolean tcpCork)
        Set the TCP_CORK option on the socket. See man 7 tcp for more details.
      • setSoBusyPoll

        public IOUringSocketChannelConfig setSoBusyPoll​(int loopMicros)
        Set the SO_BUSY_POLL option on the socket. See man 7 tcp for more details.
      • setTcpNotSentLowAt

        public IOUringSocketChannelConfig setTcpNotSentLowAt​(long tcpNotSentLowAt)
        Set the TCP_NOTSENT_LOWAT option on the socket. See man 7 tcp for more details.
        Parameters:
        tcpNotSentLowAt - is a uint32_t
      • setTrafficClass

        public IOUringSocketChannelConfig setTrafficClass​(int trafficClass)
        Specified by:
        setTrafficClass in interface io.netty.channel.socket.SocketChannelConfig
      • setTcpKeepIdle

        public IOUringSocketChannelConfig setTcpKeepIdle​(int seconds)
        Set the TCP_KEEPIDLE option on the socket. See man 7 tcp for more details.
      • setTcpKeepIntvl

        public IOUringSocketChannelConfig setTcpKeepIntvl​(int seconds)
        Set the TCP_KEEPINTVL option on the socket. See man 7 tcp for more details.
      • setTcpKeepCnt

        public IOUringSocketChannelConfig setTcpKeepCnt​(int probes)
        Set the TCP_KEEPCNT option on the socket. See man 7 tcp for more details.
      • setTcpUserTimeout

        public IOUringSocketChannelConfig setTcpUserTimeout​(int milliseconds)
        Set the TCP_USER_TIMEOUT option on the socket. See man 7 tcp for more details.
      • isIpTransparent

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

        public boolean isTcpQuickAck()
        Returns true if TCP_QUICKACK is enabled, false otherwise.
      • isTcpFastOpenConnect

        public boolean isTcpFastOpenConnect()
        Returns true if TCP_FASTOPEN_CONNECT is enabled, false otherwise.
      • isAllowHalfClosure

        public boolean isAllowHalfClosure()
        Specified by:
        isAllowHalfClosure in interface io.netty.channel.socket.DuplexChannelConfig
      • setAllowHalfClosure

        public IOUringSocketChannelConfig setAllowHalfClosure​(boolean allowHalfClosure)
        Specified by:
        setAllowHalfClosure in interface io.netty.channel.socket.DuplexChannelConfig
        Specified by:
        setAllowHalfClosure in interface io.netty.channel.socket.SocketChannelConfig
      • setConnectTimeoutMillis

        public IOUringSocketChannelConfig setConnectTimeoutMillis​(int connectTimeoutMillis)
        Specified by:
        setConnectTimeoutMillis in interface io.netty.channel.ChannelConfig
        Specified by:
        setConnectTimeoutMillis in interface io.netty.channel.socket.SocketChannelConfig
        Overrides:
        setConnectTimeoutMillis in class io.netty.channel.DefaultChannelConfig
      • setMaxMessagesPerRead

        @Deprecated
        public IOUringSocketChannelConfig setMaxMessagesPerRead​(int maxMessagesPerRead)
        Deprecated.
        Specified by:
        setMaxMessagesPerRead in interface io.netty.channel.ChannelConfig
        Specified by:
        setMaxMessagesPerRead in interface io.netty.channel.socket.DuplexChannelConfig
        Specified by:
        setMaxMessagesPerRead in interface io.netty.channel.socket.SocketChannelConfig
        Overrides:
        setMaxMessagesPerRead in class io.netty.channel.DefaultChannelConfig
      • setWriteSpinCount

        public IOUringSocketChannelConfig setWriteSpinCount​(int writeSpinCount)
        Specified by:
        setWriteSpinCount in interface io.netty.channel.ChannelConfig
        Specified by:
        setWriteSpinCount in interface io.netty.channel.socket.DuplexChannelConfig
        Specified by:
        setWriteSpinCount in interface io.netty.channel.socket.SocketChannelConfig
        Overrides:
        setWriteSpinCount in class io.netty.channel.DefaultChannelConfig
      • setAllocator

        public IOUringSocketChannelConfig setAllocator​(io.netty.buffer.ByteBufAllocator allocator)
        Specified by:
        setAllocator in interface io.netty.channel.ChannelConfig
        Specified by:
        setAllocator in interface io.netty.channel.socket.DuplexChannelConfig
        Specified by:
        setAllocator in interface io.netty.channel.socket.SocketChannelConfig
        Overrides:
        setAllocator in class io.netty.channel.DefaultChannelConfig
      • setRecvByteBufAllocator

        public IOUringSocketChannelConfig setRecvByteBufAllocator​(io.netty.channel.RecvByteBufAllocator allocator)
        Specified by:
        setRecvByteBufAllocator in interface io.netty.channel.ChannelConfig
        Specified by:
        setRecvByteBufAllocator in interface io.netty.channel.socket.DuplexChannelConfig
        Specified by:
        setRecvByteBufAllocator in interface io.netty.channel.socket.SocketChannelConfig
        Overrides:
        setRecvByteBufAllocator in class io.netty.channel.DefaultChannelConfig
      • setAutoRead

        public IOUringSocketChannelConfig setAutoRead​(boolean autoRead)
        Specified by:
        setAutoRead in interface io.netty.channel.ChannelConfig
        Specified by:
        setAutoRead in interface io.netty.channel.socket.DuplexChannelConfig
        Specified by:
        setAutoRead in interface io.netty.channel.socket.SocketChannelConfig
        Overrides:
        setAutoRead in class io.netty.channel.DefaultChannelConfig
      • setAutoClose

        public IOUringSocketChannelConfig setAutoClose​(boolean autoClose)
        Specified by:
        setAutoClose in interface io.netty.channel.ChannelConfig
        Specified by:
        setAutoClose in interface io.netty.channel.socket.DuplexChannelConfig
        Specified by:
        setAutoClose in interface io.netty.channel.socket.SocketChannelConfig
        Overrides:
        setAutoClose in class io.netty.channel.DefaultChannelConfig
      • setWriteBufferHighWaterMark

        @Deprecated
        public IOUringSocketChannelConfig setWriteBufferHighWaterMark​(int writeBufferHighWaterMark)
        Deprecated.
        Specified by:
        setWriteBufferHighWaterMark in interface io.netty.channel.ChannelConfig
        Overrides:
        setWriteBufferHighWaterMark in class io.netty.channel.DefaultChannelConfig
      • setWriteBufferLowWaterMark

        @Deprecated
        public IOUringSocketChannelConfig setWriteBufferLowWaterMark​(int writeBufferLowWaterMark)
        Deprecated.
        Specified by:
        setWriteBufferLowWaterMark in interface io.netty.channel.ChannelConfig
        Overrides:
        setWriteBufferLowWaterMark in class io.netty.channel.DefaultChannelConfig
      • setWriteBufferWaterMark

        public IOUringSocketChannelConfig setWriteBufferWaterMark​(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)
        Specified by:
        setWriteBufferWaterMark in interface io.netty.channel.ChannelConfig
        Specified by:
        setWriteBufferWaterMark in interface io.netty.channel.socket.DuplexChannelConfig
        Specified by:
        setWriteBufferWaterMark in interface io.netty.channel.socket.SocketChannelConfig
        Overrides:
        setWriteBufferWaterMark in class io.netty.channel.DefaultChannelConfig
      • setMessageSizeEstimator

        public IOUringSocketChannelConfig setMessageSizeEstimator​(io.netty.channel.MessageSizeEstimator estimator)
        Specified by:
        setMessageSizeEstimator in interface io.netty.channel.ChannelConfig
        Specified by:
        setMessageSizeEstimator in interface io.netty.channel.socket.DuplexChannelConfig
        Specified by:
        setMessageSizeEstimator in interface io.netty.channel.socket.SocketChannelConfig
        Overrides:
        setMessageSizeEstimator in class io.netty.channel.DefaultChannelConfig