Package io.netty.incubator.channel.uring
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 Summary
FieldsModifier and TypeFieldDescriptionprivate int
private int
Fields inherited from class io.netty.channel.DefaultChannelConfig
channel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
<T> T
getOption
(io.netty.channel.ChannelOption<T> option) int
int
Returns a positive value if TCP_DEFER_ACCEPT is enabled.int
Returns threshold value of number of pending for fast open connect.boolean
boolean
boolean
boolean
Returnstrue
if the SO_REUSEPORT option is set.setAllocator
(io.netty.buffer.ByteBufAllocator allocator) setAutoRead
(boolean autoRead) setBacklog
(int backlog) setConnectTimeoutMillis
(int connectTimeoutMillis) setFreeBind
(boolean freeBind) setIpTransparent
(boolean transparent) setMaxMessagesPerRead
(int maxMessagesPerRead) Deprecated.setMessageSizeEstimator
(io.netty.channel.MessageSizeEstimator estimator) <T> boolean
setOption
(io.netty.channel.ChannelOption<T> option, T value) setPerformancePreferences
(int connectionTime, int latency, int bandwidth) setReceiveBufferSize
(int receiveBufferSize) setRecvByteBufAllocator
(io.netty.channel.RecvByteBufAllocator allocator) setReuseAddress
(boolean reuseAddress) setReusePort
(boolean reusePort) Set the SO_REUSEPORT option on the underlying Channel.setTcpDeferAccept
(int deferAccept) Set theTCP_DEFER_ACCEPT
option on the socket.setTcpFastopen
(int pendingFastOpenRequestsThreshold) Enables tcpFastOpen on the server channel.setWriteBufferHighWaterMark
(int writeBufferHighWaterMark) Deprecated.setWriteBufferLowWaterMark
(int writeBufferLowWaterMark) Deprecated.setWriteBufferWaterMark
(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark) setWriteSpinCount
(int writeSpinCount) Methods inherited from class io.netty.channel.DefaultChannelConfig
autoReadCleared, getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMaxMessagesPerWrite, getMessageSizeEstimator, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setAutoClose, setMaxMessagesPerWrite, setOptions, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelConfig
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setAutoClose, setOptions
-
Field Details
-
backlog
private volatile int backlog -
pendingFastOpenRequestsThreshold
private volatile int pendingFastOpenRequestsThreshold
-
-
Constructor Details
-
IOUringServerSocketChannelConfig
IOUringServerSocketChannelConfig(AbstractIOUringServerChannel channel)
-
-
Method Details
-
getOptions
- Specified by:
getOptions
in interfaceio.netty.channel.ChannelConfig
- Overrides:
getOptions
in classio.netty.channel.DefaultChannelConfig
-
getOption
public <T> T getOption(io.netty.channel.ChannelOption<T> option) - Specified by:
getOption
in interfaceio.netty.channel.ChannelConfig
- Overrides:
getOption
in classio.netty.channel.DefaultChannelConfig
-
setOption
public <T> boolean setOption(io.netty.channel.ChannelOption<T> option, T value) - Specified by:
setOption
in interfaceio.netty.channel.ChannelConfig
- Overrides:
setOption
in classio.netty.channel.DefaultChannelConfig
-
setPerformancePreferences
public IOUringServerSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth) - Specified by:
setPerformancePreferences
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
isReuseAddress
public boolean isReuseAddress()- Specified by:
isReuseAddress
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
setReuseAddress
- Specified by:
setReuseAddress
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
getReceiveBufferSize
public int getReceiveBufferSize()- Specified by:
getReceiveBufferSize
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
setReceiveBufferSize
- Specified by:
setReceiveBufferSize
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
getBacklog
public int getBacklog()- Specified by:
getBacklog
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
setBacklog
- Specified by:
setBacklog
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
setConnectTimeoutMillis
- Specified by:
setConnectTimeoutMillis
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setConnectTimeoutMillis
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setConnectTimeoutMillis
in classio.netty.channel.DefaultChannelConfig
-
setMaxMessagesPerRead
Deprecated.- Specified by:
setMaxMessagesPerRead
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setMaxMessagesPerRead
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setMaxMessagesPerRead
in classio.netty.channel.DefaultChannelConfig
-
setWriteSpinCount
- Specified by:
setWriteSpinCount
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setWriteSpinCount
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setWriteSpinCount
in classio.netty.channel.DefaultChannelConfig
-
setAllocator
- Specified by:
setAllocator
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setAllocator
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setAllocator
in classio.netty.channel.DefaultChannelConfig
-
setRecvByteBufAllocator
public IOUringServerSocketChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator) - Specified by:
setRecvByteBufAllocator
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setRecvByteBufAllocator
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setRecvByteBufAllocator
in classio.netty.channel.DefaultChannelConfig
-
setAutoRead
- Specified by:
setAutoRead
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setAutoRead
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setAutoRead
in classio.netty.channel.DefaultChannelConfig
-
setWriteBufferHighWaterMark
@Deprecated public IOUringServerSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark) Deprecated.- Specified by:
setWriteBufferHighWaterMark
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setWriteBufferHighWaterMark
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setWriteBufferHighWaterMark
in classio.netty.channel.DefaultChannelConfig
-
setWriteBufferLowWaterMark
@Deprecated public IOUringServerSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark) Deprecated.- Specified by:
setWriteBufferLowWaterMark
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setWriteBufferLowWaterMark
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setWriteBufferLowWaterMark
in classio.netty.channel.DefaultChannelConfig
-
setWriteBufferWaterMark
public IOUringServerSocketChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark) - Specified by:
setWriteBufferWaterMark
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setWriteBufferWaterMark
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setWriteBufferWaterMark
in classio.netty.channel.DefaultChannelConfig
-
setMessageSizeEstimator
public IOUringServerSocketChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator) - Specified by:
setMessageSizeEstimator
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setMessageSizeEstimator
in interfaceio.netty.channel.socket.ServerSocketChannelConfig
- Overrides:
setMessageSizeEstimator
in classio.netty.channel.DefaultChannelConfig
-
isReusePort
public boolean isReusePort()Returnstrue
if the SO_REUSEPORT option is set. -
setReusePort
Set the SO_REUSEPORT option on the underlying Channel. This will allow to bind multipleServerSocketChannel
s to the same port and so accept connections with multiple threads. Be aware this method needs be called beforeChannel.bind(java.net.SocketAddress)
to have any affect. -
isFreeBind
public boolean isFreeBind() -
setFreeBind
-
isIpTransparent
public boolean isIpTransparent() -
setIpTransparent
-
setTcpDeferAccept
Set theTCP_DEFER_ACCEPT
option on the socket. Seeman 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
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:
-