Package io.netty.channel.epoll
Class EpollServerSocketChannelConfig
- java.lang.Object
-
- io.netty.channel.DefaultChannelConfig
-
- io.netty.channel.epoll.EpollChannelConfig
-
- io.netty.channel.epoll.EpollServerChannelConfig
-
- io.netty.channel.epoll.EpollServerSocketChannelConfig
-
- All Implemented Interfaces:
io.netty.channel.ChannelConfig,io.netty.channel.socket.ServerSocketChannelConfig
public final class EpollServerSocketChannelConfig extends EpollServerChannelConfig implements io.netty.channel.socket.ServerSocketChannelConfig
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> TgetOption(io.netty.channel.ChannelOption<T> option)Map<io.netty.channel.ChannelOption<?>,Object>getOptions()intgetTcpDeferAccept()Returns a positive value if TCP_DEFER_ACCEPT is enabled.booleanisFreeBind()booleanisIpTransparent()booleanisReusePort()Returnstrueif the SO_REUSEPORT option is set.EpollServerSocketChannelConfigsetAllocator(io.netty.buffer.ByteBufAllocator allocator)EpollServerSocketChannelConfigsetAutoRead(boolean autoRead)EpollServerSocketChannelConfigsetBacklog(int backlog)EpollServerSocketChannelConfigsetConnectTimeoutMillis(int connectTimeoutMillis)EpollServerSocketChannelConfigsetFreeBind(boolean freeBind)EpollServerSocketChannelConfigsetIpTransparent(boolean transparent)EpollServerSocketChannelConfigsetMaxMessagesPerRead(int maxMessagesPerRead)Deprecated.EpollServerSocketChannelConfigsetMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)<T> booleansetOption(io.netty.channel.ChannelOption<T> option, T value)EpollServerSocketChannelConfigsetPerformancePreferences(int connectionTime, int latency, int bandwidth)EpollServerSocketChannelConfigsetReceiveBufferSize(int receiveBufferSize)EpollServerSocketChannelConfigsetRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)EpollServerSocketChannelConfigsetReuseAddress(boolean reuseAddress)EpollServerSocketChannelConfigsetReusePort(boolean reusePort)Set the SO_REUSEPORT option on the underlying Channel.EpollServerSocketChannelConfigsetTcpDeferAccept(int deferAccept)Set theTCP_DEFER_ACCEPToption on the socket.EpollServerSocketChannelConfigsetTcpMd5Sig(Map<InetAddress,byte[]> keys)Set theTCP_MD5SIGoption on the socket.EpollServerSocketChannelConfigsetWriteBufferHighWaterMark(int writeBufferHighWaterMark)Deprecated.EpollServerSocketChannelConfigsetWriteBufferLowWaterMark(int writeBufferLowWaterMark)Deprecated.EpollServerSocketChannelConfigsetWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)EpollServerSocketChannelConfigsetWriteSpinCount(int writeSpinCount)-
Methods inherited from class io.netty.channel.epoll.EpollServerChannelConfig
getBacklog, getReceiveBufferSize, getTcpFastopen, isReuseAddress, setEpollMode, setTcpFastopen
-
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 classEpollServerChannelConfig
-
getOption
public <T> T getOption(io.netty.channel.ChannelOption<T> option)
- Specified by:
getOptionin interfaceio.netty.channel.ChannelConfig- Overrides:
getOptionin classEpollServerChannelConfig
-
setOption
public <T> boolean setOption(io.netty.channel.ChannelOption<T> option, T value)- Specified by:
setOptionin interfaceio.netty.channel.ChannelConfig- Overrides:
setOptionin classEpollServerChannelConfig
-
setReuseAddress
public EpollServerSocketChannelConfig setReuseAddress(boolean reuseAddress)
- Specified by:
setReuseAddressin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setReuseAddressin classEpollServerChannelConfig
-
setReceiveBufferSize
public EpollServerSocketChannelConfig setReceiveBufferSize(int receiveBufferSize)
- Specified by:
setReceiveBufferSizein interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setReceiveBufferSizein classEpollServerChannelConfig
-
setPerformancePreferences
public EpollServerSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth)
- Specified by:
setPerformancePreferencesin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setPerformancePreferencesin classEpollServerChannelConfig
-
setBacklog
public EpollServerSocketChannelConfig setBacklog(int backlog)
- Specified by:
setBacklogin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setBacklogin classEpollServerChannelConfig
-
setConnectTimeoutMillis
public EpollServerSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
- Specified by:
setConnectTimeoutMillisin interfaceio.netty.channel.ChannelConfig- Specified by:
setConnectTimeoutMillisin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setConnectTimeoutMillisin classEpollServerChannelConfig
-
setMaxMessagesPerRead
@Deprecated public EpollServerSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
Deprecated.- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.ChannelConfig- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setMaxMessagesPerReadin classEpollServerChannelConfig
-
setWriteSpinCount
public EpollServerSocketChannelConfig setWriteSpinCount(int writeSpinCount)
- Specified by:
setWriteSpinCountin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteSpinCountin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setWriteSpinCountin classEpollServerChannelConfig
-
setAllocator
public EpollServerSocketChannelConfig setAllocator(io.netty.buffer.ByteBufAllocator allocator)
- Specified by:
setAllocatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setAllocatorin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setAllocatorin classEpollServerChannelConfig
-
setRecvByteBufAllocator
public EpollServerSocketChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)
- Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setRecvByteBufAllocatorin classEpollServerChannelConfig
-
setAutoRead
public EpollServerSocketChannelConfig setAutoRead(boolean autoRead)
- Specified by:
setAutoReadin interfaceio.netty.channel.ChannelConfig- Specified by:
setAutoReadin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setAutoReadin classEpollServerChannelConfig
-
setWriteBufferHighWaterMark
@Deprecated public EpollServerSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Deprecated.- Specified by:
setWriteBufferHighWaterMarkin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteBufferHighWaterMarkin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setWriteBufferHighWaterMarkin classEpollServerChannelConfig
-
setWriteBufferLowWaterMark
@Deprecated public EpollServerSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Deprecated.- Specified by:
setWriteBufferLowWaterMarkin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteBufferLowWaterMarkin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setWriteBufferLowWaterMarkin classEpollServerChannelConfig
-
setWriteBufferWaterMark
public EpollServerSocketChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)
- Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setWriteBufferWaterMarkin classEpollServerChannelConfig
-
setMessageSizeEstimator
public EpollServerSocketChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)
- Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.socket.ServerSocketChannelConfig- Overrides:
setMessageSizeEstimatorin classEpollServerChannelConfig
-
setTcpMd5Sig
public EpollServerSocketChannelConfig setTcpMd5Sig(Map<InetAddress,byte[]> keys)
Set theTCP_MD5SIGoption on the socket. Seelinux/tcp.hfor more details. Keys can only be set on, not read to prevent a potential leak, as they are confidential. Allowing them being read would mean anyone with access to the channel could get them.
-
isReusePort
public boolean isReusePort()
Returnstrueif the SO_REUSEPORT option is set.
-
setReusePort
public EpollServerSocketChannelConfig setReusePort(boolean reusePort)
Set the SO_REUSEPORT option on the underlying Channel. This will allow to bind multipleEpollSocketChannels to the same port and so accept connections with multiple threads. Be aware this method needs be called beforeChannel.bind(java.net.SocketAddress)to have any affect.
-
isFreeBind
public boolean isFreeBind()
-
setFreeBind
public EpollServerSocketChannelConfig setFreeBind(boolean freeBind)
-
isIpTransparent
public boolean isIpTransparent()
-
setIpTransparent
public EpollServerSocketChannelConfig setIpTransparent(boolean transparent)
-
setTcpDeferAccept
public EpollServerSocketChannelConfig setTcpDeferAccept(int deferAccept)
Set theTCP_DEFER_ACCEPToption on the socket. Seeman 7 tcpfor more details.
-
getTcpDeferAccept
public int getTcpDeferAccept()
Returns a positive value if TCP_DEFER_ACCEPT is enabled.
-
-