Top Fields Constructors Methods
io.netty.incubator.channel.uring

public final Class IOUringServerSocketChannelConfig

extends DefaultChannelConfig
implements ServerSocketChannelConfig
Class Inheritance
All Implemented Interfaces
io.netty.channel.socket.ServerSocketChannelConfig, io.netty.channel.ChannelConfig
Imports
io.netty.buffer.ByteBufAllocator, io.netty.channel.ChannelException, .ChannelOption, .DefaultChannelConfig, .MessageSizeEstimator, .RecvByteBufAllocator, .ServerChannelRecvByteBufAllocator, .WriteBufferWaterMark, io.netty.channel.socket.ServerSocketChannelConfig, io.netty.util.NetUtil, java.io.IOException, java.util.Map

Field Summary

Modifier and TypeField and Description
private volatile int
private volatile int
Inherited from io.netty.channel.DefaultChannelConfig:
channel

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
getBacklog()

Implements io.netty.channel.socket.ServerSocketChannelConfig.getBacklog.

Gets the backlog value to specify when the channel binds to a local address.
public <T> T
public Map<ChannelOption<?>, Object>
public int
public int
getTcpDeferAccept()

Returns a positive value if TCP_DEFER_ACCEPT is enabled.

public int
getTcpFastopen()

Returns threshold value of number of pending for fast open connect.

public boolean
isFreeBind()

Returns true if IP_FREEBIND is enabled, false otherwise.

public boolean
isIpTransparent()

Returns true if IP_TRANSPARENT is enabled, false otherwise.

public boolean
public boolean
isReusePort()

Returns true if the SO_REUSEPORT option is set.

public IOUringServerSocketChannelConfig
public IOUringServerSocketChannelConfig
setAutoRead(boolean autoRead)

Overrides io.netty.channel.DefaultChannelConfig.setAutoRead.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setAutoRead, io.netty.channel.ChannelConfig.setAutoRead.

Sets if ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't need to call it at all.
public IOUringServerSocketChannelConfig
setBacklog(int backlog)

Implements io.netty.channel.socket.ServerSocketChannelConfig.setBacklog.

Sets the backlog value to specify when the channel binds to a local address.
public IOUringServerSocketChannelConfig
setConnectTimeoutMillis(int
the connect timeout in milliseconds. 0 to disable.
connectTimeoutMillis
)

Overrides io.netty.channel.DefaultChannelConfig.setConnectTimeoutMillis.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setConnectTimeoutMillis, io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Sets the connect timeout of the channel in milliseconds.
public IOUringServerSocketChannelConfig
setFreeBind(boolean freeBind)

If true is used IP_FREEBIND is enabled, false for disable it.

public IOUringServerSocketChannelConfig
setIpTransparent(boolean transparent)

If true is used IP_TRANSPARENT is enabled, false for disable it.

public IOUringServerSocketChannelConfig
public IOUringServerSocketChannelConfig
public <T> boolean
setOption(ChannelOption<T> option, T value)

Overrides io.netty.channel.DefaultChannelConfig.setOption.

Implements io.netty.channel.ChannelConfig.setOption.

Sets a configuration property with the specified name and value.
public IOUringServerSocketChannelConfig
setPerformancePreferences(int connectionTime, int latency, int bandwidth)

Implements io.netty.channel.socket.ServerSocketChannelConfig.setPerformancePreferences.

Sets the performance preferences as specified in ServerSocket#setPerformancePreferences(int, int, int).
public IOUringServerSocketChannelConfig
public IOUringServerSocketChannelConfig
public IOUringServerSocketChannelConfig
public IOUringServerSocketChannelConfig
setReusePort(boolean reusePort)

Set the SO_REUSEPORT option on the underlying Channel.

public IOUringServerSocketChannelConfig
setTcpDeferAccept(int deferAccept)

Set the TCP_DEFER_ACCEPT option on the socket.

public IOUringServerSocketChannelConfig
setTcpFastopen(int
number of requests to be pending for fastopen at a given point in time for security.
pendingFastOpenRequestsThreshold
)

Enables tcpFastOpen on the server channel.

public IOUringServerSocketChannelConfig
public IOUringServerSocketChannelConfig
public IOUringServerSocketChannelConfig
public IOUringServerSocketChannelConfig
Inherited from io.netty.channel.DefaultChannelConfig:
autoReadClearedgetAllocatorgetConnectTimeoutMillisgetMaxMessagesPerReadgetMaxMessagesPerWritegetMessageSizeEstimatorgetOptionsgetRecvByteBufAllocatorgetWriteBufferHighWaterMarkgetWriteBufferLowWaterMarkgetWriteBufferWaterMarkgetWriteSpinCountisAutoCloseisAutoReadsetAutoClosesetMaxMessagesPerWritesetOptionsvalidate

Field Detail

backlogback to summary
private volatile int backlog
pendingFastOpenRequestsThresholdback to summary
private volatile int pendingFastOpenRequestsThreshold

Constructor Detail

IOUringServerSocketChannelConfigback to summary
pack-priv IOUringServerSocketChannelConfig(AbstractIOUringServerChannel channel)

Method Detail

getBacklogback to summary
public int getBacklog()

Implements io.netty.channel.socket.ServerSocketChannelConfig.getBacklog.

Doc from io.netty.channel.socket.ServerSocketChannelConfig.getBacklog.

Gets the backlog value to specify when the channel binds to a local address.

Annotations
@Override
getOptionback to summary
public <T> T getOption(ChannelOption<T> option)

Overrides io.netty.channel.DefaultChannelConfig.getOption.

Implements io.netty.channel.ChannelConfig.getOption.

Doc from io.netty.channel.ChannelConfig.getOption.

Return the value of the given ChannelOption

Annotations
@SuppressWarnings:unchecked
@Override
getOptionsback to summary
public Map<ChannelOption<?>, Object> getOptions()

Overrides io.netty.channel.DefaultChannelConfig.getOptions.

Implements io.netty.channel.ChannelConfig.getOptions.

Doc from io.netty.channel.ChannelConfig.getOptions.

Return all set ChannelOption's.

Annotations
@Override
getReceiveBufferSizeback to summary
public int getReceiveBufferSize()

Implements io.netty.channel.socket.ServerSocketChannelConfig.getReceiveBufferSize.

Doc from io.netty.channel.socket.ServerSocketChannelConfig.getReceiveBufferSize.

Gets the StandardSocketOptions#SO_RCVBUF option.

Annotations
@Override
getTcpDeferAcceptback to summary
public int getTcpDeferAccept()

Returns a positive value if TCP_DEFER_ACCEPT is enabled.

getTcpFastopenback to summary
public int getTcpFastopen()

Returns threshold value of number of pending for fast open connect.

See Also
RFC 7413 Passive Open
isFreeBindback to summary
public boolean isFreeBind()

Returns true if IP_FREEBIND is enabled, false otherwise.

isIpTransparentback to summary
public boolean isIpTransparent()

Returns true if IP_TRANSPARENT is enabled, false otherwise.

isReuseAddressback to summary
public boolean isReuseAddress()

Implements io.netty.channel.socket.ServerSocketChannelConfig.isReuseAddress.

Doc from io.netty.channel.socket.ServerSocketChannelConfig.isReuseAddress.

Gets the StandardSocketOptions#SO_REUSEADDR option.

Annotations
@Override
isReusePortback to summary
public boolean isReusePort()

Returns true if the SO_REUSEPORT option is set.

setAllocatorback to summary
public IOUringServerSocketChannelConfig setAllocator(ByteBufAllocator allocator)

Overrides io.netty.channel.DefaultChannelConfig.setAllocator.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setAllocator, io.netty.channel.ChannelConfig.setAllocator.

Doc from io.netty.channel.ChannelConfig.setAllocator.

Set the ByteBufAllocator which is used for the channel to allocate buffers.

Annotations
@Override
setAutoReadback to summary
public IOUringServerSocketChannelConfig setAutoRead(boolean autoRead)

Overrides io.netty.channel.DefaultChannelConfig.setAutoRead.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setAutoRead, io.netty.channel.ChannelConfig.setAutoRead.

Doc from io.netty.channel.ChannelConfig.setAutoRead.

Sets if ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't need to call it at all. The default value is true.

Annotations
@Override
setBacklogback to summary
public IOUringServerSocketChannelConfig setBacklog(int backlog)

Implements io.netty.channel.socket.ServerSocketChannelConfig.setBacklog.

Doc from io.netty.channel.socket.ServerSocketChannelConfig.setBacklog.

Sets the backlog value to specify when the channel binds to a local address.

Annotations
@Override
setConnectTimeoutMillisback to summary
public IOUringServerSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)

Overrides io.netty.channel.DefaultChannelConfig.setConnectTimeoutMillis.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setConnectTimeoutMillis, io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Doc from io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Sets the connect timeout of the channel in milliseconds. If the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.

Parameters
connectTimeoutMillis:int

the connect timeout in milliseconds. 0 to disable.

Annotations
@Override
setFreeBindback to summary
public IOUringServerSocketChannelConfig setFreeBind(boolean freeBind)

If true is used IP_FREEBIND is enabled, false for disable it. Default is disabled.

setIpTransparentback to summary
public IOUringServerSocketChannelConfig setIpTransparent(boolean transparent)

If true is used IP_TRANSPARENT is enabled, false for disable it. Default is disabled.

setMaxMessagesPerReadback to summary
public IOUringServerSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)

Overrides io.netty.channel.DefaultChannelConfig.setMaxMessagesPerRead.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setMaxMessagesPerRead, io.netty.channel.ChannelConfig.setMaxMessagesPerRead.

Doc from io.netty.channel.DefaultChannelConfig.setMaxMessagesPerRead.

Deprecated

Annotations
@Override
@Deprecated
setMessageSizeEstimatorback to summary
public IOUringServerSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator)

Overrides io.netty.channel.DefaultChannelConfig.setMessageSizeEstimator.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setMessageSizeEstimator, io.netty.channel.ChannelConfig.setMessageSizeEstimator.

Doc from io.netty.channel.ChannelConfig.setMessageSizeEstimator.

Set the MessageSizeEstimator which is used for the channel to detect the size of a message.

Annotations
@Override
setOptionback to summary
public <T> boolean setOption(ChannelOption<T> option, T value)

Overrides io.netty.channel.DefaultChannelConfig.setOption.

Implements io.netty.channel.ChannelConfig.setOption.

Doc from io.netty.channel.ChannelConfig.setOption.

Sets a configuration property with the specified name and value. To override this method properly, you must call the super class:

public boolean setOption(ChannelOption<T> option, T value) {
    if (super.setOption(option, value)) {
        return true;
    }

    if (option.equals(additionalOption)) {
        ....
        return true;
    }

    return false;
}
Returns:boolean

true if and only if the property has been set

Annotations
@Override
setPerformancePreferencesback to summary
public IOUringServerSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth)

Implements io.netty.channel.socket.ServerSocketChannelConfig.setPerformancePreferences.

Doc from io.netty.channel.socket.ServerSocketChannelConfig.setPerformancePreferences.

Sets the performance preferences as specified in ServerSocket#setPerformancePreferences(int, int, int).

Annotations
@Override
setReceiveBufferSizeback to summary
public IOUringServerSocketChannelConfig setReceiveBufferSize(int receiveBufferSize)

Implements io.netty.channel.socket.ServerSocketChannelConfig.setReceiveBufferSize.

Doc from io.netty.channel.socket.ServerSocketChannelConfig.setReceiveBufferSize.

Gets the StandardSocketOptions#SO_SNDBUF option.

Annotations
@Override
setRecvByteBufAllocatorback to summary
public IOUringServerSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator)

Overrides io.netty.channel.DefaultChannelConfig.setRecvByteBufAllocator.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setRecvByteBufAllocator, io.netty.channel.ChannelConfig.setRecvByteBufAllocator.

Doc from io.netty.channel.ChannelConfig.setRecvByteBufAllocator.

Set the RecvByteBufAllocator which is used for the channel to allocate receive buffers.

Annotations
@Override
setReuseAddressback to summary
public IOUringServerSocketChannelConfig setReuseAddress(boolean reuseAddress)

Implements io.netty.channel.socket.ServerSocketChannelConfig.setReuseAddress.

Doc from io.netty.channel.socket.ServerSocketChannelConfig.setReuseAddress.

Sets the StandardSocketOptions#SO_REUSEADDR option.

Annotations
@Override
setReusePortback to summary
public IOUringServerSocketChannelConfig setReusePort(boolean reusePort)

Set the SO_REUSEPORT option on the underlying Channel. This will allow to bind multiple io.netty.channel.socket.ServerSocketChannels to the same port and so accept connections with multiple threads. Be aware this method needs be called before io.netty.channel.socket.ServerSocketChannel#bind(java.net.SocketAddress) to have any affect.

setTcpDeferAcceptback to summary
public IOUringServerSocketChannelConfig setTcpDeferAccept(int deferAccept)

Set the TCP_DEFER_ACCEPT option on the socket. See man 7 tcp for more details.

setTcpFastopenback to summary
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:int

number of requests to be pending for fastopen at a given point in time for security.

See Also
RFC 7413 Passive Open
setWriteBufferHighWaterMarkback to summary
public IOUringServerSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)

Overrides io.netty.channel.DefaultChannelConfig.setWriteBufferHighWaterMark.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setWriteBufferHighWaterMark, io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Deprecated

Sets the high water mark of the write buffer. If the number of bytes queued in the write buffer exceeds this value, Channel#isWritable() will start to return false.

Annotations
@Override
@Deprecated
setWriteBufferLowWaterMarkback to summary
public IOUringServerSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)

Overrides io.netty.channel.DefaultChannelConfig.setWriteBufferLowWaterMark.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setWriteBufferLowWaterMark, io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Deprecated

Sets the low water mark of the write buffer. Once the number of bytes queued in the write buffer exceeded the high water mark and then dropped down below this value, Channel#isWritable() will start to return true again.

Annotations
@Override
@Deprecated
setWriteBufferWaterMarkback to summary
public IOUringServerSocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)

Overrides io.netty.channel.DefaultChannelConfig.setWriteBufferWaterMark.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setWriteBufferWaterMark, io.netty.channel.ChannelConfig.setWriteBufferWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferWaterMark.

Set the WriteBufferWaterMark which is used for setting the high and low water mark of the write buffer.

Annotations
@Override
setWriteSpinCountback to summary
public IOUringServerSocketChannelConfig setWriteSpinCount(int writeSpinCount)

Overrides io.netty.channel.DefaultChannelConfig.setWriteSpinCount.

Implements io.netty.channel.socket.ServerSocketChannelConfig.setWriteSpinCount, io.netty.channel.ChannelConfig.setWriteSpinCount.

Doc from io.netty.channel.ChannelConfig.setWriteSpinCount.

Sets the maximum loop count for a write operation until WritableByteChannel#write(ByteBuffer) returns a non-zero value. It is similar to what a spin lock is used for in concurrency programming. It improves memory utilization and write throughput depending on the platform that JVM runs on. The default value is 16.

Annotations
@Override