Class IOUringServerSocketChannelConfig

java.lang.Object
io.netty.channel.DefaultChannelConfig
io.netty.incubator.channel.uring.IOUringServerSocketChannelConfig
All Implemented Interfaces:
io.netty.channel.ChannelConfig, io.netty.channel.socket.ServerSocketChannelConfig

public final class IOUringServerSocketChannelConfig extends io.netty.channel.DefaultChannelConfig implements io.netty.channel.socket.ServerSocketChannelConfig
  • Field Details

    • backlog

      private volatile int backlog
    • pendingFastOpenRequestsThreshold

      private volatile int pendingFastOpenRequestsThreshold
  • Constructor Details

  • Method Details

    • getOptions

      public Map<io.netty.channel.ChannelOption<?>,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
    • setPerformancePreferences

      public IOUringServerSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth)
      Specified by:
      setPerformancePreferences in interface io.netty.channel.socket.ServerSocketChannelConfig
    • isReuseAddress

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

      public IOUringServerSocketChannelConfig setReuseAddress(boolean reuseAddress)
      Specified by:
      setReuseAddress in interface io.netty.channel.socket.ServerSocketChannelConfig
    • getReceiveBufferSize

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

      public IOUringServerSocketChannelConfig setReceiveBufferSize(int receiveBufferSize)
      Specified by:
      setReceiveBufferSize in interface io.netty.channel.socket.ServerSocketChannelConfig
    • getBacklog

      public int getBacklog()
      Specified by:
      getBacklog in interface io.netty.channel.socket.ServerSocketChannelConfig
    • setBacklog

      public IOUringServerSocketChannelConfig setBacklog(int backlog)
      Specified by:
      setBacklog in interface io.netty.channel.socket.ServerSocketChannelConfig
    • setConnectTimeoutMillis

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

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

      public IOUringServerSocketChannelConfig setWriteSpinCount(int writeSpinCount)
      Specified by:
      setWriteSpinCount in interface io.netty.channel.ChannelConfig
      Specified by:
      setWriteSpinCount in interface io.netty.channel.socket.ServerSocketChannelConfig
      Overrides:
      setWriteSpinCount in class io.netty.channel.DefaultChannelConfig
    • setAllocator

      public IOUringServerSocketChannelConfig setAllocator(io.netty.buffer.ByteBufAllocator allocator)
      Specified by:
      setAllocator in interface io.netty.channel.ChannelConfig
      Specified by:
      setAllocator in interface io.netty.channel.socket.ServerSocketChannelConfig
      Overrides:
      setAllocator in class io.netty.channel.DefaultChannelConfig
    • setRecvByteBufAllocator

      public IOUringServerSocketChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)
      Specified by:
      setRecvByteBufAllocator in interface io.netty.channel.ChannelConfig
      Specified by:
      setRecvByteBufAllocator in interface io.netty.channel.socket.ServerSocketChannelConfig
      Overrides:
      setRecvByteBufAllocator in class io.netty.channel.DefaultChannelConfig
    • setAutoRead

      public IOUringServerSocketChannelConfig setAutoRead(boolean autoRead)
      Specified by:
      setAutoRead in interface io.netty.channel.ChannelConfig
      Specified by:
      setAutoRead in interface io.netty.channel.socket.ServerSocketChannelConfig
      Overrides:
      setAutoRead in class io.netty.channel.DefaultChannelConfig
    • setWriteBufferHighWaterMark

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

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

      public IOUringServerSocketChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)
      Specified by:
      setWriteBufferWaterMark in interface io.netty.channel.ChannelConfig
      Specified by:
      setWriteBufferWaterMark in interface io.netty.channel.socket.ServerSocketChannelConfig
      Overrides:
      setWriteBufferWaterMark in class io.netty.channel.DefaultChannelConfig
    • setMessageSizeEstimator

      public IOUringServerSocketChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)
      Specified by:
      setMessageSizeEstimator in interface io.netty.channel.ChannelConfig
      Specified by:
      setMessageSizeEstimator in interface io.netty.channel.socket.ServerSocketChannelConfig
      Overrides:
      setMessageSizeEstimator in class io.netty.channel.DefaultChannelConfig
    • isReusePort

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

      public IOUringServerSocketChannelConfig setReusePort(boolean reusePort)
      Set the SO_REUSEPORT option on the underlying Channel. This will allow to bind multiple ServerSocketChannels 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.
    • isFreeBind

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

      public IOUringServerSocketChannelConfig setFreeBind(boolean freeBind)
      If true is used IP_FREEBIND is enabled, false for disable it. Default is disabled.
    • isIpTransparent

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

      public IOUringServerSocketChannelConfig setIpTransparent(boolean transparent)
      If true is used IP_TRANSPARENT is enabled, false for disable it. Default is disabled.
    • setTcpDeferAccept

      public IOUringServerSocketChannelConfig setTcpDeferAccept(int deferAccept)
      Set the TCP_DEFER_ACCEPT option on the socket. See man 7 tcp for more details.
    • getTcpDeferAccept

      public int getTcpDeferAccept()
      Returns a positive value if TCP_DEFER_ACCEPT is enabled.
    • getTcpFastopen

      public int getTcpFastopen()
      Returns threshold value of number of pending for fast open connect.
      See Also:
    • setTcpFastopen

      public IOUringServerSocketChannelConfig setTcpFastopen(int pendingFastOpenRequestsThreshold)
      Enables tcpFastOpen on the server channel. If the underlying os doesn't support TCP_FASTOPEN setting this has no effect. This has to be set before doing listen on the socket otherwise this takes no effect.
      Parameters:
      pendingFastOpenRequestsThreshold - number of requests to be pending for fastopen at a given point in time for security.
      See Also: