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