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 booleanallowHalfClosureprivate booleantcpFastopen
-
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> TgetOption(io.netty.channel.ChannelOption<T> option)java.util.Map<io.netty.channel.ChannelOption<?>,java.lang.Object>getOptions()intgetReceiveBufferSize()intgetSendBufferSize()intgetSoBusyPoll()Get theSO_BUSY_POLLoption on the socket.intgetSoLinger()intgetTcpKeepCnt()Get theTCP_KEEPCNToption on the socket.intgetTcpKeepIdle()Get theTCP_KEEPIDLEoption on the socket.intgetTcpKeepIntvl()Get theTCP_KEEPINTVLoption on the socket.longgetTcpNotSentLowAt()Get theTCP_NOTSENT_LOWAToption on the socket.intgetTcpUserTimeout()Get theTCP_USER_TIMEOUToption on the socket.intgetTrafficClass()booleanisAllowHalfClosure()booleanisIpTransparent()booleanisKeepAlive()booleanisReuseAddress()booleanisTcpCork()Get theTCP_CORKoption on the socket.booleanisTcpFastOpenConnect()ReturnstrueifTCP_FASTOPEN_CONNECTis enabled,falseotherwise.booleanisTcpNoDelay()booleanisTcpQuickAck()IOUringSocketChannelConfigsetAllocator(io.netty.buffer.ByteBufAllocator allocator)IOUringSocketChannelConfigsetAllowHalfClosure(boolean allowHalfClosure)IOUringSocketChannelConfigsetAutoClose(boolean autoClose)IOUringSocketChannelConfigsetAutoRead(boolean autoRead)IOUringSocketChannelConfigsetConnectTimeoutMillis(int connectTimeoutMillis)IOUringSocketChannelConfigsetIpTransparent(boolean transparent)IOUringSocketChannelConfigsetKeepAlive(boolean keepAlive)IOUringSocketChannelConfigsetMaxMessagesPerRead(int maxMessagesPerRead)Deprecated.IOUringSocketChannelConfigsetMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)<T> booleansetOption(io.netty.channel.ChannelOption<T> option, T value)IOUringSocketChannelConfigsetPerformancePreferences(int connectionTime, int latency, int bandwidth)IOUringSocketChannelConfigsetReceiveBufferSize(int receiveBufferSize)IOUringSocketChannelConfigsetRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)IOUringSocketChannelConfigsetReuseAddress(boolean reuseAddress)IOUringSocketChannelConfigsetSendBufferSize(int sendBufferSize)IOUringSocketChannelConfigsetSoBusyPoll(int loopMicros)Set theSO_BUSY_POLLoption on the socket.IOUringSocketChannelConfigsetSoLinger(int soLinger)IOUringSocketChannelConfigsetTcpCork(boolean tcpCork)Set theTCP_CORKoption on the socket.IOUringSocketChannelConfigsetTcpFastOpenConnect(boolean fastOpenConnect)Enables client TCP fast open.IOUringSocketChannelConfigsetTcpKeepCnt(int probes)Set theTCP_KEEPCNToption on the socket.IOUringSocketChannelConfigsetTcpKeepCntl(int probes)Deprecated.IOUringSocketChannelConfigsetTcpKeepIdle(int seconds)Set theTCP_KEEPIDLEoption on the socket.IOUringSocketChannelConfigsetTcpKeepIntvl(int seconds)Set theTCP_KEEPINTVLoption on the socket.IOUringSocketChannelConfigsetTcpNoDelay(boolean tcpNoDelay)IOUringSocketChannelConfigsetTcpNotSentLowAt(long tcpNotSentLowAt)Set theTCP_NOTSENT_LOWAToption on the socket.IOUringSocketChannelConfigsetTcpQuickAck(boolean quickAck)Set theTCP_QUICKACKoption on the socket.IOUringSocketChannelConfigsetTcpUserTimeout(int milliseconds)Set theTCP_USER_TIMEOUToption on the socket.IOUringSocketChannelConfigsetTrafficClass(int trafficClass)IOUringSocketChannelConfigsetWriteBufferHighWaterMark(int writeBufferHighWaterMark)Deprecated.IOUringSocketChannelConfigsetWriteBufferLowWaterMark(int writeBufferLowWaterMark)Deprecated.IOUringSocketChannelConfigsetWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)IOUringSocketChannelConfigsetWriteSpinCount(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:
getOptionsin interfaceio.netty.channel.ChannelConfig- Overrides:
getOptionsin classio.netty.channel.DefaultChannelConfig
-
getOption
public <T> T getOption(io.netty.channel.ChannelOption<T> option)
- Specified by:
getOptionin interfaceio.netty.channel.ChannelConfig- Overrides:
getOptionin classio.netty.channel.DefaultChannelConfig
-
setOption
public <T> boolean setOption(io.netty.channel.ChannelOption<T> option, T value)- Specified by:
setOptionin interfaceio.netty.channel.ChannelConfig- Overrides:
setOptionin classio.netty.channel.DefaultChannelConfig
-
getSendBufferSize
public int getSendBufferSize()
- Specified by:
getSendBufferSizein interfaceio.netty.channel.socket.SocketChannelConfig
-
getSoLinger
public int getSoLinger()
- Specified by:
getSoLingerin interfaceio.netty.channel.socket.SocketChannelConfig
-
getTrafficClass
public int getTrafficClass()
- Specified by:
getTrafficClassin interfaceio.netty.channel.socket.SocketChannelConfig
-
isKeepAlive
public boolean isKeepAlive()
- Specified by:
isKeepAlivein interfaceio.netty.channel.socket.SocketChannelConfig
-
isReuseAddress
public boolean isReuseAddress()
- Specified by:
isReuseAddressin interfaceio.netty.channel.socket.SocketChannelConfig
-
isTcpNoDelay
public boolean isTcpNoDelay()
- Specified by:
isTcpNoDelayin interfaceio.netty.channel.socket.SocketChannelConfig
-
isTcpCork
public boolean isTcpCork()
Get theTCP_CORKoption on the socket. Seeman 7 tcpfor more details.
-
getSoBusyPoll
public int getSoBusyPoll()
Get theSO_BUSY_POLLoption on the socket. Seeman 7 tcpfor more details.
-
getTcpNotSentLowAt
public long getTcpNotSentLowAt()
Get theTCP_NOTSENT_LOWAToption on the socket. Seeman 7 tcpfor more details.- Returns:
- value is a uint32_t
-
getTcpKeepIdle
public int getTcpKeepIdle()
Get theTCP_KEEPIDLEoption on the socket. Seeman 7 tcpfor more details.
-
getTcpKeepIntvl
public int getTcpKeepIntvl()
Get theTCP_KEEPINTVLoption on the socket. Seeman 7 tcpfor more details.
-
getTcpKeepCnt
public int getTcpKeepCnt()
Get theTCP_KEEPCNToption on the socket. Seeman 7 tcpfor more details.
-
getTcpUserTimeout
public int getTcpUserTimeout()
Get theTCP_USER_TIMEOUToption on the socket. Seeman 7 tcpfor more details.
-
setKeepAlive
public IOUringSocketChannelConfig setKeepAlive(boolean keepAlive)
- Specified by:
setKeepAlivein interfaceio.netty.channel.socket.SocketChannelConfig
-
setPerformancePreferences
public IOUringSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth)
- Specified by:
setPerformancePreferencesin interfaceio.netty.channel.socket.SocketChannelConfig
-
setReceiveBufferSize
public IOUringSocketChannelConfig setReceiveBufferSize(int receiveBufferSize)
- Specified by:
setReceiveBufferSizein interfaceio.netty.channel.socket.SocketChannelConfig
-
setReuseAddress
public IOUringSocketChannelConfig setReuseAddress(boolean reuseAddress)
- Specified by:
setReuseAddressin interfaceio.netty.channel.socket.SocketChannelConfig
-
setSendBufferSize
public IOUringSocketChannelConfig setSendBufferSize(int sendBufferSize)
- Specified by:
setSendBufferSizein interfaceio.netty.channel.socket.SocketChannelConfig
-
getReceiveBufferSize
public int getReceiveBufferSize()
- Specified by:
getReceiveBufferSizein interfaceio.netty.channel.socket.SocketChannelConfig
-
setSoLinger
public IOUringSocketChannelConfig setSoLinger(int soLinger)
- Specified by:
setSoLingerin interfaceio.netty.channel.socket.SocketChannelConfig
-
setTcpNoDelay
public IOUringSocketChannelConfig setTcpNoDelay(boolean tcpNoDelay)
- Specified by:
setTcpNoDelayin interfaceio.netty.channel.socket.SocketChannelConfig
-
setTcpCork
public IOUringSocketChannelConfig setTcpCork(boolean tcpCork)
Set theTCP_CORKoption on the socket. Seeman 7 tcpfor more details.
-
setSoBusyPoll
public IOUringSocketChannelConfig setSoBusyPoll(int loopMicros)
Set theSO_BUSY_POLLoption on the socket. Seeman 7 tcpfor more details.
-
setTcpNotSentLowAt
public IOUringSocketChannelConfig setTcpNotSentLowAt(long tcpNotSentLowAt)
Set theTCP_NOTSENT_LOWAToption on the socket. Seeman 7 tcpfor more details.- Parameters:
tcpNotSentLowAt- is a uint32_t
-
setTrafficClass
public IOUringSocketChannelConfig setTrafficClass(int trafficClass)
- Specified by:
setTrafficClassin interfaceio.netty.channel.socket.SocketChannelConfig
-
setTcpKeepIdle
public IOUringSocketChannelConfig setTcpKeepIdle(int seconds)
Set theTCP_KEEPIDLEoption on the socket. Seeman 7 tcpfor more details.
-
setTcpKeepIntvl
public IOUringSocketChannelConfig setTcpKeepIntvl(int seconds)
Set theTCP_KEEPINTVLoption on the socket. Seeman 7 tcpfor more details.
-
setTcpKeepCntl
@Deprecated public IOUringSocketChannelConfig setTcpKeepCntl(int probes)
Deprecated.
-
setTcpKeepCnt
public IOUringSocketChannelConfig setTcpKeepCnt(int probes)
Set theTCP_KEEPCNToption on the socket. Seeman 7 tcpfor more details.
-
setTcpUserTimeout
public IOUringSocketChannelConfig setTcpUserTimeout(int milliseconds)
Set theTCP_USER_TIMEOUToption on the socket. Seeman 7 tcpfor more details.
-
isIpTransparent
public boolean isIpTransparent()
-
setIpTransparent
public IOUringSocketChannelConfig setIpTransparent(boolean transparent)
-
setTcpQuickAck
public IOUringSocketChannelConfig setTcpQuickAck(boolean quickAck)
Set theTCP_QUICKACKoption 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()
ReturnstrueifTCP_FASTOPEN_CONNECTis enabled,falseotherwise.
-
isAllowHalfClosure
public boolean isAllowHalfClosure()
- Specified by:
isAllowHalfClosurein interfaceio.netty.channel.socket.DuplexChannelConfig
-
setAllowHalfClosure
public IOUringSocketChannelConfig setAllowHalfClosure(boolean allowHalfClosure)
- Specified by:
setAllowHalfClosurein interfaceio.netty.channel.socket.DuplexChannelConfig- Specified by:
setAllowHalfClosurein interfaceio.netty.channel.socket.SocketChannelConfig
-
setConnectTimeoutMillis
public IOUringSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
- Specified by:
setConnectTimeoutMillisin interfaceio.netty.channel.ChannelConfig- Specified by:
setConnectTimeoutMillisin interfaceio.netty.channel.socket.SocketChannelConfig- Overrides:
setConnectTimeoutMillisin classio.netty.channel.DefaultChannelConfig
-
setMaxMessagesPerRead
@Deprecated public IOUringSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
Deprecated.- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.ChannelConfig- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.socket.DuplexChannelConfig- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.socket.SocketChannelConfig- Overrides:
setMaxMessagesPerReadin classio.netty.channel.DefaultChannelConfig
-
setWriteSpinCount
public IOUringSocketChannelConfig setWriteSpinCount(int writeSpinCount)
- Specified by:
setWriteSpinCountin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteSpinCountin interfaceio.netty.channel.socket.DuplexChannelConfig- Specified by:
setWriteSpinCountin interfaceio.netty.channel.socket.SocketChannelConfig- Overrides:
setWriteSpinCountin classio.netty.channel.DefaultChannelConfig
-
setAllocator
public IOUringSocketChannelConfig setAllocator(io.netty.buffer.ByteBufAllocator allocator)
- Specified by:
setAllocatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setAllocatorin interfaceio.netty.channel.socket.DuplexChannelConfig- Specified by:
setAllocatorin interfaceio.netty.channel.socket.SocketChannelConfig- Overrides:
setAllocatorin classio.netty.channel.DefaultChannelConfig
-
setRecvByteBufAllocator
public IOUringSocketChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)
- Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.socket.DuplexChannelConfig- Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.socket.SocketChannelConfig- Overrides:
setRecvByteBufAllocatorin classio.netty.channel.DefaultChannelConfig
-
setAutoRead
public IOUringSocketChannelConfig setAutoRead(boolean autoRead)
- Specified by:
setAutoReadin interfaceio.netty.channel.ChannelConfig- Specified by:
setAutoReadin interfaceio.netty.channel.socket.DuplexChannelConfig- Specified by:
setAutoReadin interfaceio.netty.channel.socket.SocketChannelConfig- Overrides:
setAutoReadin classio.netty.channel.DefaultChannelConfig
-
setAutoClose
public IOUringSocketChannelConfig setAutoClose(boolean autoClose)
- Specified by:
setAutoClosein interfaceio.netty.channel.ChannelConfig- Specified by:
setAutoClosein interfaceio.netty.channel.socket.DuplexChannelConfig- Specified by:
setAutoClosein interfaceio.netty.channel.socket.SocketChannelConfig- Overrides:
setAutoClosein classio.netty.channel.DefaultChannelConfig
-
setWriteBufferHighWaterMark
@Deprecated public IOUringSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Deprecated.- Specified by:
setWriteBufferHighWaterMarkin interfaceio.netty.channel.ChannelConfig- Overrides:
setWriteBufferHighWaterMarkin classio.netty.channel.DefaultChannelConfig
-
setWriteBufferLowWaterMark
@Deprecated public IOUringSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Deprecated.- Specified by:
setWriteBufferLowWaterMarkin interfaceio.netty.channel.ChannelConfig- Overrides:
setWriteBufferLowWaterMarkin classio.netty.channel.DefaultChannelConfig
-
setWriteBufferWaterMark
public IOUringSocketChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)
- Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.socket.DuplexChannelConfig- Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.socket.SocketChannelConfig- Overrides:
setWriteBufferWaterMarkin classio.netty.channel.DefaultChannelConfig
-
setMessageSizeEstimator
public IOUringSocketChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)
- Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.socket.DuplexChannelConfig- Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.socket.SocketChannelConfig- Overrides:
setMessageSizeEstimatorin classio.netty.channel.DefaultChannelConfig
-
-