Package io.netty.channel.epoll
Class EpollChannelConfig
- java.lang.Object
-
- io.netty.channel.DefaultChannelConfig
-
- io.netty.channel.epoll.EpollChannelConfig
-
- All Implemented Interfaces:
io.netty.channel.ChannelConfig
- Direct Known Subclasses:
EpollDatagramChannelConfig,EpollDomainDatagramChannelConfig,EpollDomainSocketChannelConfig,EpollServerChannelConfig,EpollSocketChannelConfig
public class EpollChannelConfig extends io.netty.channel.DefaultChannelConfig
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEpollChannelConfig(io.netty.channel.Channel channel)protectedEpollChannelConfig(io.netty.channel.Channel channel, io.netty.channel.RecvByteBufAllocator recvByteBufAllocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidautoReadCleared()EpollModegetEpollMode()Deprecated.Netty always uses level-triggered mode and so this method is just a no-op.protected longgetMaxBytesPerGatheringWrite()<T> TgetOption(io.netty.channel.ChannelOption<T> option)Map<io.netty.channel.ChannelOption<?>,Object>getOptions()EpollChannelConfigsetAllocator(io.netty.buffer.ByteBufAllocator allocator)EpollChannelConfigsetAutoRead(boolean autoRead)EpollChannelConfigsetConnectTimeoutMillis(int connectTimeoutMillis)EpollChannelConfigsetEpollMode(EpollMode mode)Deprecated.Netty always uses level-triggered mode and so this method is just a no-op.protected voidsetMaxBytesPerGatheringWrite(long maxBytesPerGatheringWrite)EpollChannelConfigsetMaxMessagesPerRead(int maxMessagesPerRead)Deprecated.EpollChannelConfigsetMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)<T> booleansetOption(io.netty.channel.ChannelOption<T> option, T value)EpollChannelConfigsetRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)EpollChannelConfigsetWriteBufferHighWaterMark(int writeBufferHighWaterMark)Deprecated.EpollChannelConfigsetWriteBufferLowWaterMark(int writeBufferLowWaterMark)Deprecated.EpollChannelConfigsetWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)EpollChannelConfigsetWriteSpinCount(int writeSpinCount)protected LinuxSocketsocket()-
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
-
-
-
-
Method Detail
-
socket
protected LinuxSocket socket()
-
getOptions
public Map<io.netty.channel.ChannelOption<?>,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
-
setConnectTimeoutMillis
public EpollChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
- Specified by:
setConnectTimeoutMillisin interfaceio.netty.channel.ChannelConfig- Overrides:
setConnectTimeoutMillisin classio.netty.channel.DefaultChannelConfig
-
setMaxMessagesPerRead
@Deprecated public EpollChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
Deprecated.- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.ChannelConfig- Overrides:
setMaxMessagesPerReadin classio.netty.channel.DefaultChannelConfig
-
setWriteSpinCount
public EpollChannelConfig setWriteSpinCount(int writeSpinCount)
- Specified by:
setWriteSpinCountin interfaceio.netty.channel.ChannelConfig- Overrides:
setWriteSpinCountin classio.netty.channel.DefaultChannelConfig
-
setAllocator
public EpollChannelConfig setAllocator(io.netty.buffer.ByteBufAllocator allocator)
- Specified by:
setAllocatorin interfaceio.netty.channel.ChannelConfig- Overrides:
setAllocatorin classio.netty.channel.DefaultChannelConfig
-
setRecvByteBufAllocator
public EpollChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)
- Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.ChannelConfig- Overrides:
setRecvByteBufAllocatorin classio.netty.channel.DefaultChannelConfig
-
setAutoRead
public EpollChannelConfig setAutoRead(boolean autoRead)
- Specified by:
setAutoReadin interfaceio.netty.channel.ChannelConfig- Overrides:
setAutoReadin classio.netty.channel.DefaultChannelConfig
-
setWriteBufferHighWaterMark
@Deprecated public EpollChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Deprecated.- Specified by:
setWriteBufferHighWaterMarkin interfaceio.netty.channel.ChannelConfig- Overrides:
setWriteBufferHighWaterMarkin classio.netty.channel.DefaultChannelConfig
-
setWriteBufferLowWaterMark
@Deprecated public EpollChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Deprecated.- Specified by:
setWriteBufferLowWaterMarkin interfaceio.netty.channel.ChannelConfig- Overrides:
setWriteBufferLowWaterMarkin classio.netty.channel.DefaultChannelConfig
-
setWriteBufferWaterMark
public EpollChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)
- Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.ChannelConfig- Overrides:
setWriteBufferWaterMarkin classio.netty.channel.DefaultChannelConfig
-
setMessageSizeEstimator
public EpollChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)
- Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.ChannelConfig- Overrides:
setMessageSizeEstimatorin classio.netty.channel.DefaultChannelConfig
-
getEpollMode
@Deprecated public EpollMode getEpollMode()
Deprecated.Netty always uses level-triggered mode and so this method is just a no-op.Return theEpollModeused. Default isEpollMode.EDGE_TRIGGERED. If you want to useDefaultChannelConfig.isAutoRead()falseorDefaultChannelConfig.getMaxMessagesPerRead()and have an accurate behaviour you should useEpollMode.LEVEL_TRIGGERED.
-
setEpollMode
@Deprecated public EpollChannelConfig setEpollMode(EpollMode mode)
Deprecated.Netty always uses level-triggered mode and so this method is just a no-op.Set 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.
-
autoReadCleared
protected final void autoReadCleared()
- Overrides:
autoReadClearedin classio.netty.channel.DefaultChannelConfig
-
setMaxBytesPerGatheringWrite
protected final void setMaxBytesPerGatheringWrite(long maxBytesPerGatheringWrite)
-
getMaxBytesPerGatheringWrite
protected final long getMaxBytesPerGatheringWrite()
-
-