Top Fields Constructors Methods
io.netty.channel.epoll

public Class EpollChannelConfig

extends DefaultChannelConfig
Class Inheritance
Known Direct Subclasses
io.netty.channel.epoll.EpollDatagramChannelConfig, io.netty.channel.epoll.EpollDomainDatagramChannelConfig, io.netty.channel.epoll.EpollDomainSocketChannelConfig, io.netty.channel.epoll.EpollServerChannelConfig, io.netty.channel.epoll.EpollSocketChannelConfig
Imports
io.netty.buffer.ByteBufAllocator, io.netty.channel.Channel, .ChannelException, .ChannelOption, .DefaultChannelConfig, .MessageSizeEstimator, .RecvByteBufAllocator, .WriteBufferWaterMark, io.netty.channel.unix.IntegerUnixChannelOption, .RawUnixChannelOption, io.netty.util.internal.ObjectUtil, java.io.IOException, java.nio.ByteBuffer, java.util.Map

Field Summary

Modifier and TypeField and Description
private volatile long
Inherited from io.netty.channel.DefaultChannelConfig:
channel

Constructor Summary

AccessConstructor and Description
protected
protected
EpollChannelConfig(Channel channel, RecvByteBufAllocator recvByteBufAllocator)

Method Summary

Modifier and TypeMethod and Description
protected final void
autoReadCleared()

Overrides io.netty.channel.DefaultChannelConfig.autoReadCleared.

Is called once setAutoRead(boolean) is called with false and isAutoRead() was true before.
private static Channel
private void
public EpollMode
getEpollMode()

Return the EpollMode used.

protected final long
public <T> T
public Map<ChannelOption<?>, Object>
public EpollChannelConfig
setAllocator(ByteBufAllocator allocator)

Overrides io.netty.channel.DefaultChannelConfig.setAllocator.

Implements io.netty.channel.ChannelConfig.setAllocator.

Set the ByteBufAllocator which is used for the channel to allocate buffers.
public EpollChannelConfig
setAutoRead(boolean autoRead)

Overrides io.netty.channel.DefaultChannelConfig.setAutoRead.

Implements io.netty.channel.ChannelConfig.setAutoRead.

Sets if ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't need to call it at all.
public EpollChannelConfig
setConnectTimeoutMillis(int
the connect timeout in milliseconds. 0 to disable.
connectTimeoutMillis
)

Overrides io.netty.channel.DefaultChannelConfig.setConnectTimeoutMillis.

Implements io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Sets the connect timeout of the channel in milliseconds.
public EpollChannelConfig
setEpollMode(EpollMode mode)

Set the EpollMode used.

protected final void
setMaxBytesPerGatheringWrite(long maxBytesPerGatheringWrite)

public EpollChannelConfig
public EpollChannelConfig
public <T> boolean
setOption(ChannelOption<T> option, T value)

Overrides io.netty.channel.DefaultChannelConfig.setOption.

Implements io.netty.channel.ChannelConfig.setOption.

Sets a configuration property with the specified name and value.
public EpollChannelConfig
public EpollChannelConfig
setWriteBufferHighWaterMark(int writeBufferHighWaterMark)

Overrides io.netty.channel.DefaultChannelConfig.setWriteBufferHighWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Deprecated

Sets the high water mark of the write buffer.

public EpollChannelConfig
setWriteBufferLowWaterMark(int writeBufferLowWaterMark)

Overrides io.netty.channel.DefaultChannelConfig.setWriteBufferLowWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Deprecated

Sets the low water mark of the write buffer.

public EpollChannelConfig
setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)

Overrides io.netty.channel.DefaultChannelConfig.setWriteBufferWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferWaterMark.

Set the WriteBufferWaterMark which is used for setting the high and low water mark of the write buffer.
public EpollChannelConfig
setWriteSpinCount(int writeSpinCount)

Overrides io.netty.channel.DefaultChannelConfig.setWriteSpinCount.

Implements io.netty.channel.ChannelConfig.setWriteSpinCount.

Sets the maximum loop count for a write operation until WritableByteChannel#write(ByteBuffer) returns a non-zero value.
protected LinuxSocket
Inherited from io.netty.channel.DefaultChannelConfig:
getAllocatorgetConnectTimeoutMillisgetMaxMessagesPerReadgetMaxMessagesPerWritegetMessageSizeEstimatorgetOptionsgetRecvByteBufAllocatorgetWriteBufferHighWaterMarkgetWriteBufferLowWaterMarkgetWriteBufferWaterMarkgetWriteSpinCountisAutoCloseisAutoReadsetAutoClosesetMaxMessagesPerWritesetOptionsvalidate

Field Detail

maxBytesPerGatheringWriteback to summary
private volatile long maxBytesPerGatheringWrite

Constructor Detail

EpollChannelConfigback to summary
protected EpollChannelConfig(Channel channel)
EpollChannelConfigback to summary
protected EpollChannelConfig(Channel channel, RecvByteBufAllocator recvByteBufAllocator)

Method Detail

autoReadClearedback to summary
protected final void autoReadCleared()

Overrides io.netty.channel.DefaultChannelConfig.autoReadCleared.

Doc from io.netty.channel.DefaultChannelConfig.autoReadCleared.

Is called once setAutoRead(boolean) is called with false and isAutoRead() was true before.

Annotations
@Override
checkAbstractEpollChannelback to summary
private static Channel checkAbstractEpollChannel(Channel channel)
checkChannelNotRegisteredback to summary
private void checkChannelNotRegistered()
getEpollModeback to summary
public EpollMode getEpollMode()

Return the EpollMode used. Default is EpollMode#EDGE_TRIGGERED. If you want to use isAutoRead() false or getMaxMessagesPerRead() and have an accurate behaviour you should use EpollMode#LEVEL_TRIGGERED.

getMaxBytesPerGatheringWriteback to summary
protected final long getMaxBytesPerGatheringWrite()
getOptionback to summary
public <T> T getOption(ChannelOption<T> option)

Overrides io.netty.channel.DefaultChannelConfig.getOption.

Implements io.netty.channel.ChannelConfig.getOption.

Doc from io.netty.channel.ChannelConfig.getOption.

Return the value of the given ChannelOption

Annotations
@SuppressWarnings:unchecked
@Override
getOptionsback to summary
public Map<ChannelOption<?>, Object> getOptions()

Overrides io.netty.channel.DefaultChannelConfig.getOptions.

Implements io.netty.channel.ChannelConfig.getOptions.

Doc from io.netty.channel.ChannelConfig.getOptions.

Return all set ChannelOption's.

Annotations
@Override
setAllocatorback to summary
public EpollChannelConfig setAllocator(ByteBufAllocator allocator)

Overrides io.netty.channel.DefaultChannelConfig.setAllocator.

Implements io.netty.channel.ChannelConfig.setAllocator.

Doc from io.netty.channel.ChannelConfig.setAllocator.

Set the ByteBufAllocator which is used for the channel to allocate buffers.

Annotations
@Override
setAutoReadback to summary
public EpollChannelConfig setAutoRead(boolean autoRead)

Overrides io.netty.channel.DefaultChannelConfig.setAutoRead.

Implements io.netty.channel.ChannelConfig.setAutoRead.

Doc from io.netty.channel.ChannelConfig.setAutoRead.

Sets if ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't need to call it at all. The default value is true.

Annotations
@Override
setConnectTimeoutMillisback to summary
public EpollChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)

Overrides io.netty.channel.DefaultChannelConfig.setConnectTimeoutMillis.

Implements io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Doc from io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Sets the connect timeout of the channel in milliseconds. If the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.

Parameters
connectTimeoutMillis:int

the connect timeout in milliseconds. 0 to disable.

Annotations
@Override
setEpollModeback to summary
public EpollChannelConfig setEpollMode(EpollMode mode)

Set the EpollMode used. Default is EpollMode#EDGE_TRIGGERED. If you want to use isAutoRead() false or getMaxMessagesPerRead() and have an accurate behaviour you should use EpollMode#LEVEL_TRIGGERED. Be aware this config setting can only be adjusted before the channel was registered.

setMaxBytesPerGatheringWriteback to summary
protected final void setMaxBytesPerGatheringWrite(long maxBytesPerGatheringWrite)
setMaxMessagesPerReadback to summary
public EpollChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)

Overrides io.netty.channel.DefaultChannelConfig.setMaxMessagesPerRead.

Implements io.netty.channel.ChannelConfig.setMaxMessagesPerRead.

Doc from io.netty.channel.DefaultChannelConfig.setMaxMessagesPerRead.

Deprecated

Annotations
@Override
@Deprecated
setMessageSizeEstimatorback to summary
public EpollChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator)

Overrides io.netty.channel.DefaultChannelConfig.setMessageSizeEstimator.

Implements io.netty.channel.ChannelConfig.setMessageSizeEstimator.

Doc from io.netty.channel.ChannelConfig.setMessageSizeEstimator.

Set the MessageSizeEstimator which is used for the channel to detect the size of a message.

Annotations
@Override
setOptionback to summary
public <T> boolean setOption(ChannelOption<T> option, T value)

Overrides io.netty.channel.DefaultChannelConfig.setOption.

Implements io.netty.channel.ChannelConfig.setOption.

Doc from io.netty.channel.ChannelConfig.setOption.

Sets a configuration property with the specified name and value. To override this method properly, you must call the super class:

public boolean setOption(ChannelOption<T> option, T value) {
    if (super.setOption(option, value)) {
        return true;
    }

    if (option.equals(additionalOption)) {
        ....
        return true;
    }

    return false;
}
Returns:boolean

true if and only if the property has been set

Annotations
@Override
setRecvByteBufAllocatorback to summary
public EpollChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator)

Overrides io.netty.channel.DefaultChannelConfig.setRecvByteBufAllocator.

Implements io.netty.channel.ChannelConfig.setRecvByteBufAllocator.

Doc from io.netty.channel.ChannelConfig.setRecvByteBufAllocator.

Set the RecvByteBufAllocator which is used for the channel to allocate receive buffers.

Annotations
@Override
setWriteBufferHighWaterMarkback to summary
public EpollChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)

Overrides io.netty.channel.DefaultChannelConfig.setWriteBufferHighWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Deprecated

Sets the high water mark of the write buffer. If the number of bytes queued in the write buffer exceeds this value, Channel#isWritable() will start to return false.

Annotations
@Override
@Deprecated
setWriteBufferLowWaterMarkback to summary
public EpollChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)

Overrides io.netty.channel.DefaultChannelConfig.setWriteBufferLowWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Deprecated

Sets the low water mark of the write buffer. Once the number of bytes queued in the write buffer exceeded the high water mark and then dropped down below this value, Channel#isWritable() will start to return true again.

Annotations
@Override
@Deprecated
setWriteBufferWaterMarkback to summary
public EpollChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)

Overrides io.netty.channel.DefaultChannelConfig.setWriteBufferWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferWaterMark.

Set the WriteBufferWaterMark which is used for setting the high and low water mark of the write buffer.

Annotations
@Override
setWriteSpinCountback to summary
public EpollChannelConfig setWriteSpinCount(int writeSpinCount)

Overrides io.netty.channel.DefaultChannelConfig.setWriteSpinCount.

Implements io.netty.channel.ChannelConfig.setWriteSpinCount.

Doc from io.netty.channel.ChannelConfig.setWriteSpinCount.

Sets the maximum loop count for a write operation until WritableByteChannel#write(ByteBuffer) returns a non-zero value. It is similar to what a spin lock is used for in concurrency programming. It improves memory utilization and write throughput depending on the platform that JVM runs on. The default value is 16.

Annotations
@Override
socketback to summary
protected LinuxSocket socket()