Package io.netty.channel.epoll
Class EpollServerChannelConfig
- java.lang.Object
-
- io.netty.channel.DefaultChannelConfig
-
- io.netty.channel.epoll.EpollChannelConfig
-
- io.netty.channel.epoll.EpollServerChannelConfig
-
- All Implemented Interfaces:
io.netty.channel.ChannelConfig,io.netty.channel.socket.ServerSocketChannelConfig
- Direct Known Subclasses:
EpollServerSocketChannelConfig
public class EpollServerChannelConfig extends EpollChannelConfig implements io.netty.channel.socket.ServerSocketChannelConfig
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetBacklog()<T> TgetOption(io.netty.channel.ChannelOption<T> option)Map<io.netty.channel.ChannelOption<?>,Object>getOptions()intgetReceiveBufferSize()intgetTcpFastopen()Returns threshold value of number of pending for fast open connect.booleanisReuseAddress()EpollServerChannelConfigsetAllocator(io.netty.buffer.ByteBufAllocator allocator)EpollServerChannelConfigsetAutoRead(boolean autoRead)EpollServerChannelConfigsetBacklog(int backlog)EpollServerChannelConfigsetConnectTimeoutMillis(int connectTimeoutMillis)EpollServerChannelConfigsetEpollMode(EpollMode mode)Set theEpollModeused.EpollServerChannelConfigsetMaxMessagesPerRead(int maxMessagesPerRead)Deprecated.EpollServerChannelConfigsetMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)<T> booleansetOption(io.netty.channel.ChannelOption<T> option, T value)EpollServerChannelConfigsetPerformancePreferences(int connectionTime, int latency, int bandwidth)EpollServerChannelConfigsetReceiveBufferSize(int receiveBufferSize)EpollServerChannelConfigsetRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)EpollServerChannelConfigsetReuseAddress(boolean reuseAddress)EpollServerChannelConfigsetTcpFastopen(int pendingFastOpenRequestsThreshold)Enables tcpFastOpen on the server channel.EpollServerChannelConfigsetWriteBufferHighWaterMark(int writeBufferHighWaterMark)Deprecated.EpollServerChannelConfigsetWriteBufferLowWaterMark(int writeBufferLowWaterMark)Deprecated.EpollServerChannelConfigsetWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)EpollServerChannelConfigsetWriteSpinCount(int writeSpinCount)-
Methods inherited from class io.netty.channel.epoll.EpollChannelConfig
autoReadCleared, getEpollMode, getMaxBytesPerGatheringWrite, setMaxBytesPerGatheringWrite, socket
-
Methods inherited from class io.netty.channel.DefaultChannelConfig
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
-
-
-
-
Method Detail
-
getOptions
public Map<io.netty.channel.ChannelOption<?>,Object> getOptions()
- Specified by:
getOptionsin interfaceio.netty.channel.ChannelConfig- Overrides:
getOptionsin classEpollChannelConfig
-
getOption
public <T> T getOption(io.netty.channel.ChannelOption<T> option)
- Specified by:
getOptionin interfaceio.netty.channel.ChannelConfig- Overrides:
getOptionin classEpollChannelConfig
-
setOption
public <T> boolean setOption(io.netty.channel.ChannelOption<T> option, T value)- Specified by:
setOptionin interfaceio.netty.channel.ChannelConfig- Overrides:
setOptionin classEpollChannelConfig
-
isReuseAddress
public boolean isReuseAddress()
- Specified by:
isReuseAddressin interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
setReuseAddress
public EpollServerChannelConfig setReuseAddress(boolean reuseAddress)
- Specified by:
setReuseAddressin interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
getReceiveBufferSize
public int getReceiveBufferSize()
- Specified by:
getReceiveBufferSizein interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
setReceiveBufferSize
public EpollServerChannelConfig setReceiveBufferSize(int receiveBufferSize)
- Specified by:
setReceiveBufferSizein interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
getBacklog
public int getBacklog()
- Specified by:
getBacklogin interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
setBacklog
public EpollServerChannelConfig setBacklog(int backlog)
- Specified by:
setBacklogin interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
getTcpFastopen
public int getTcpFastopen()
Returns threshold value of number of pending for fast open connect.- See Also:
- RFC 7413 Passive Open
-
setTcpFastopen
public EpollServerChannelConfig 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- number of requests to be pending for fastopen at a given point in time for security.- See Also:
- RFC 7413 Passive Open
-
setPerformancePreferences
public EpollServerChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth)
- Specified by:
setPerformancePreferencesin interfaceio.netty.channel.socket.ServerSocketChannelConfig
-
setConnectTimeoutMillis
public EpollServerChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
- Specified by:
setConnectTimeoutMillisin interfaceio.netty.channel.ChannelConfig- Specified by:
setConnectTimeoutMillisin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setConnectTimeoutMillisin classEpollChannelConfig
-
setMaxMessagesPerRead
@Deprecated public EpollServerChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
Deprecated.- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.ChannelConfig- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setMaxMessagesPerReadin classEpollChannelConfig
-
setWriteSpinCount
public EpollServerChannelConfig setWriteSpinCount(int writeSpinCount)
- Specified by:
setWriteSpinCountin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteSpinCountin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setWriteSpinCountin classEpollChannelConfig
-
setAllocator
public EpollServerChannelConfig setAllocator(io.netty.buffer.ByteBufAllocator allocator)
- Specified by:
setAllocatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setAllocatorin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setAllocatorin classEpollChannelConfig
-
setRecvByteBufAllocator
public EpollServerChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)
- Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setRecvByteBufAllocatorin classEpollChannelConfig
-
setAutoRead
public EpollServerChannelConfig setAutoRead(boolean autoRead)
- Specified by:
setAutoReadin interfaceio.netty.channel.ChannelConfig- Specified by:
setAutoReadin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setAutoReadin classEpollChannelConfig
-
setWriteBufferHighWaterMark
@Deprecated public EpollServerChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Deprecated.- Specified by:
setWriteBufferHighWaterMarkin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteBufferHighWaterMarkin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setWriteBufferHighWaterMarkin classEpollChannelConfig
-
setWriteBufferLowWaterMark
@Deprecated public EpollServerChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Deprecated.- Specified by:
setWriteBufferLowWaterMarkin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteBufferLowWaterMarkin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setWriteBufferLowWaterMarkin classEpollChannelConfig
-
setWriteBufferWaterMark
public EpollServerChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)
- Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setWriteBufferWaterMarkin classEpollChannelConfig
-
setMessageSizeEstimator
public EpollServerChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)
- Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setMessageSizeEstimatorin classEpollChannelConfig
-
setEpollMode
public EpollServerChannelConfig setEpollMode(EpollMode mode)
Description copied from class:EpollChannelConfigSet theEpollModeused. Default isEpollMode.EDGE_TRIGGERED. If you want to useDefaultChannelConfig.isAutoRead()falseorDefaultChannelConfig.getMaxMessagesPerRead()and have an accurate behaviour you should useEpollMode.LEVEL_TRIGGERED. Be aware this config setting can only be adjusted before the channel was registered.- Overrides:
setEpollModein classEpollChannelConfig
-
-