Package io.netty.incubator.channel.uring
Class IOUringSocketChannelConfig
java.lang.Object
io.netty.channel.DefaultChannelConfig
io.netty.incubator.channel.uring.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 Summary
FieldsFields inherited from class io.netty.channel.DefaultChannelConfig
channel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
getOption
(io.netty.channel.ChannelOption<T> option) int
int
int
Get theSO_BUSY_POLL
option on the socket.int
int
Get theTCP_KEEPCNT
option on the socket.int
Get theTCP_KEEPIDLE
option on the socket.int
Get theTCP_KEEPINTVL
option on the socket.long
Get theTCP_NOTSENT_LOWAT
option on the socket.int
Get theTCP_USER_TIMEOUT
option on the socket.int
boolean
boolean
boolean
boolean
boolean
Get theTCP_CORK
option on the socket.boolean
Returnstrue
ifTCP_FASTOPEN_CONNECT
is enabled,false
otherwise.boolean
boolean
setAllocator
(io.netty.buffer.ByteBufAllocator allocator) setAllowHalfClosure
(boolean allowHalfClosure) setAutoClose
(boolean autoClose) setAutoRead
(boolean autoRead) setConnectTimeoutMillis
(int connectTimeoutMillis) setIpTransparent
(boolean transparent) setKeepAlive
(boolean keepAlive) 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) setSendBufferSize
(int sendBufferSize) setSoBusyPoll
(int loopMicros) Set theSO_BUSY_POLL
option on the socket.setSoLinger
(int soLinger) setTcpCork
(boolean tcpCork) Set theTCP_CORK
option on the socket.setTcpFastOpenConnect
(boolean fastOpenConnect) Enables client TCP fast open.setTcpKeepCnt
(int probes) Set theTCP_KEEPCNT
option on the socket.setTcpKeepCntl
(int probes) Deprecated.setTcpKeepIdle
(int seconds) Set theTCP_KEEPIDLE
option on the socket.setTcpKeepIntvl
(int seconds) Set theTCP_KEEPINTVL
option on the socket.setTcpNoDelay
(boolean tcpNoDelay) setTcpNotSentLowAt
(long tcpNotSentLowAt) Set theTCP_NOTSENT_LOWAT
option on the socket.setTcpQuickAck
(boolean quickAck) Set theTCP_QUICKACK
option on the socket.setTcpUserTimeout
(int milliseconds) Set theTCP_USER_TIMEOUT
option on the socket.setTrafficClass
(int trafficClass) 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, 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, setOptions
-
Field Details
-
allowHalfClosure
private volatile boolean allowHalfClosure -
tcpFastopen
private volatile boolean tcpFastopen
-
-
Constructor Details
-
IOUringSocketChannelConfig
IOUringSocketChannelConfig(io.netty.channel.Channel 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
-
getSendBufferSize
public int getSendBufferSize()- Specified by:
getSendBufferSize
in interfaceio.netty.channel.socket.SocketChannelConfig
-
getSoLinger
public int getSoLinger()- Specified by:
getSoLinger
in interfaceio.netty.channel.socket.SocketChannelConfig
-
getTrafficClass
public int getTrafficClass()- Specified by:
getTrafficClass
in interfaceio.netty.channel.socket.SocketChannelConfig
-
isKeepAlive
public boolean isKeepAlive()- Specified by:
isKeepAlive
in interfaceio.netty.channel.socket.SocketChannelConfig
-
isReuseAddress
public boolean isReuseAddress()- Specified by:
isReuseAddress
in interfaceio.netty.channel.socket.SocketChannelConfig
-
isTcpNoDelay
public boolean isTcpNoDelay()- Specified by:
isTcpNoDelay
in interfaceio.netty.channel.socket.SocketChannelConfig
-
isTcpCork
public boolean isTcpCork()Get theTCP_CORK
option on the socket. Seeman 7 tcp
for more details. -
getSoBusyPoll
public int getSoBusyPoll()Get theSO_BUSY_POLL
option on the socket. Seeman 7 tcp
for more details. -
getTcpNotSentLowAt
public long getTcpNotSentLowAt()Get theTCP_NOTSENT_LOWAT
option on the socket. Seeman 7 tcp
for more details.- Returns:
- value is a uint32_t
-
getTcpKeepIdle
public int getTcpKeepIdle()Get theTCP_KEEPIDLE
option on the socket. Seeman 7 tcp
for more details. -
getTcpKeepIntvl
public int getTcpKeepIntvl()Get theTCP_KEEPINTVL
option on the socket. Seeman 7 tcp
for more details. -
getTcpKeepCnt
public int getTcpKeepCnt()Get theTCP_KEEPCNT
option on the socket. Seeman 7 tcp
for more details. -
getTcpUserTimeout
public int getTcpUserTimeout()Get theTCP_USER_TIMEOUT
option on the socket. Seeman 7 tcp
for more details. -
setKeepAlive
- Specified by:
setKeepAlive
in interfaceio.netty.channel.socket.SocketChannelConfig
-
setPerformancePreferences
public IOUringSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth) - Specified by:
setPerformancePreferences
in interfaceio.netty.channel.socket.SocketChannelConfig
-
setReceiveBufferSize
- Specified by:
setReceiveBufferSize
in interfaceio.netty.channel.socket.SocketChannelConfig
-
setReuseAddress
- Specified by:
setReuseAddress
in interfaceio.netty.channel.socket.SocketChannelConfig
-
setSendBufferSize
- Specified by:
setSendBufferSize
in interfaceio.netty.channel.socket.SocketChannelConfig
-
getReceiveBufferSize
public int getReceiveBufferSize()- Specified by:
getReceiveBufferSize
in interfaceio.netty.channel.socket.SocketChannelConfig
-
setSoLinger
- Specified by:
setSoLinger
in interfaceio.netty.channel.socket.SocketChannelConfig
-
setTcpNoDelay
- Specified by:
setTcpNoDelay
in interfaceio.netty.channel.socket.SocketChannelConfig
-
setTcpCork
Set theTCP_CORK
option on the socket. Seeman 7 tcp
for more details. -
setSoBusyPoll
Set theSO_BUSY_POLL
option on the socket. Seeman 7 tcp
for more details. -
setTcpNotSentLowAt
Set theTCP_NOTSENT_LOWAT
option on the socket. Seeman 7 tcp
for more details.- Parameters:
tcpNotSentLowAt
- is a uint32_t
-
setTrafficClass
- Specified by:
setTrafficClass
in interfaceio.netty.channel.socket.SocketChannelConfig
-
setTcpKeepIdle
Set theTCP_KEEPIDLE
option on the socket. Seeman 7 tcp
for more details. -
setTcpKeepIntvl
Set theTCP_KEEPINTVL
option on the socket. Seeman 7 tcp
for more details. -
setTcpKeepCntl
Deprecated. -
setTcpKeepCnt
Set theTCP_KEEPCNT
option on the socket. Seeman 7 tcp
for more details. -
setTcpUserTimeout
Set theTCP_USER_TIMEOUT
option on the socket. Seeman 7 tcp
for more details. -
isIpTransparent
public boolean isIpTransparent() -
setIpTransparent
-
setTcpQuickAck
Set theTCP_QUICKACK
option on the socket. See TCP_QUICKACK for more details. -
isTcpQuickAck
public boolean isTcpQuickAck() -
setTcpFastOpenConnect
Enables client TCP fast open. See this LWN article for more info. -
isTcpFastOpenConnect
public boolean isTcpFastOpenConnect()Returnstrue
ifTCP_FASTOPEN_CONNECT
is enabled,false
otherwise. -
isAllowHalfClosure
public boolean isAllowHalfClosure()- Specified by:
isAllowHalfClosure
in interfaceio.netty.channel.socket.DuplexChannelConfig
-
setAllowHalfClosure
- Specified by:
setAllowHalfClosure
in interfaceio.netty.channel.socket.DuplexChannelConfig
- Specified by:
setAllowHalfClosure
in interfaceio.netty.channel.socket.SocketChannelConfig
-
setConnectTimeoutMillis
- Specified by:
setConnectTimeoutMillis
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setConnectTimeoutMillis
in interfaceio.netty.channel.socket.SocketChannelConfig
- 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.DuplexChannelConfig
- Specified by:
setMaxMessagesPerRead
in interfaceio.netty.channel.socket.SocketChannelConfig
- Overrides:
setMaxMessagesPerRead
in classio.netty.channel.DefaultChannelConfig
-
setWriteSpinCount
- Specified by:
setWriteSpinCount
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setWriteSpinCount
in interfaceio.netty.channel.socket.DuplexChannelConfig
- Specified by:
setWriteSpinCount
in interfaceio.netty.channel.socket.SocketChannelConfig
- Overrides:
setWriteSpinCount
in classio.netty.channel.DefaultChannelConfig
-
setAllocator
- Specified by:
setAllocator
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setAllocator
in interfaceio.netty.channel.socket.DuplexChannelConfig
- Specified by:
setAllocator
in interfaceio.netty.channel.socket.SocketChannelConfig
- Overrides:
setAllocator
in classio.netty.channel.DefaultChannelConfig
-
setRecvByteBufAllocator
public IOUringSocketChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator) - Specified by:
setRecvByteBufAllocator
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setRecvByteBufAllocator
in interfaceio.netty.channel.socket.DuplexChannelConfig
- Specified by:
setRecvByteBufAllocator
in interfaceio.netty.channel.socket.SocketChannelConfig
- Overrides:
setRecvByteBufAllocator
in classio.netty.channel.DefaultChannelConfig
-
setAutoRead
- Specified by:
setAutoRead
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setAutoRead
in interfaceio.netty.channel.socket.DuplexChannelConfig
- Specified by:
setAutoRead
in interfaceio.netty.channel.socket.SocketChannelConfig
- Overrides:
setAutoRead
in classio.netty.channel.DefaultChannelConfig
-
setAutoClose
- Specified by:
setAutoClose
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setAutoClose
in interfaceio.netty.channel.socket.DuplexChannelConfig
- Specified by:
setAutoClose
in interfaceio.netty.channel.socket.SocketChannelConfig
- Overrides:
setAutoClose
in classio.netty.channel.DefaultChannelConfig
-
setWriteBufferHighWaterMark
@Deprecated public IOUringSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark) Deprecated.- Specified by:
setWriteBufferHighWaterMark
in interfaceio.netty.channel.ChannelConfig
- Overrides:
setWriteBufferHighWaterMark
in classio.netty.channel.DefaultChannelConfig
-
setWriteBufferLowWaterMark
@Deprecated public IOUringSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark) Deprecated.- Specified by:
setWriteBufferLowWaterMark
in interfaceio.netty.channel.ChannelConfig
- Overrides:
setWriteBufferLowWaterMark
in classio.netty.channel.DefaultChannelConfig
-
setWriteBufferWaterMark
public IOUringSocketChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark) - Specified by:
setWriteBufferWaterMark
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setWriteBufferWaterMark
in interfaceio.netty.channel.socket.DuplexChannelConfig
- Specified by:
setWriteBufferWaterMark
in interfaceio.netty.channel.socket.SocketChannelConfig
- Overrides:
setWriteBufferWaterMark
in classio.netty.channel.DefaultChannelConfig
-
setMessageSizeEstimator
public IOUringSocketChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator) - Specified by:
setMessageSizeEstimator
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setMessageSizeEstimator
in interfaceio.netty.channel.socket.DuplexChannelConfig
- Specified by:
setMessageSizeEstimator
in interfaceio.netty.channel.socket.SocketChannelConfig
- Overrides:
setMessageSizeEstimator
in classio.netty.channel.DefaultChannelConfig
-
setTcpKeepCnt(int)