@UnstableApi public class KQueueChannelConfig extends DefaultChannelConfig
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setAutoClose, setOptions, validatepublic java.util.Map<ChannelOption<?>,java.lang.Object> getOptions()
ChannelConfig
ChannelOption的。
getOptions在界面
ChannelConfig
getOptions在课堂上
DefaultChannelConfig
public <T> T getOption(ChannelOption<T> option)
ChannelConfig
ChannelOption的值
getOption ,界面
ChannelConfig
getOption ,等级
DefaultChannelConfig
public <T> boolean setOption(ChannelOption<T> option, T value)
ChannelConfig
public boolean setOption(ChannelOption<T> option, T value) {
if (super.setOption(option, value)) {
return true;
}
if (option.equals(additionalOption)) {
....
return true;
}
return false;
}
setOption ,界面
ChannelConfig
setOption在课堂上
DefaultChannelConfig
true当且仅当该属性已设置
public KQueueChannelConfig setRcvAllocTransportProvidesGuess(boolean transportProvidesGuess)
true那么
RecvByteBufAllocator.Handle#guess()将被覆盖,以总是尝试读取kqueue所说的可用字节数。
public boolean getRcvAllocTransportProvidesGuess()
true那么
RecvByteBufAllocator.Handle#guess()将被覆盖,以总是尝试读取与kqueue所说的可用字节数一样多的字节。
public KQueueChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
ChannelConfig复制的描述
Channel不支持连接操作,则完全不使用此属性,因此将被忽略。
setConnectTimeoutMillis在界面
ChannelConfig
setConnectTimeoutMillis在课堂上
DefaultChannelConfig
connectTimeoutMillis - 以毫秒为单位的连接超时。
0禁用。
@Deprecated public KQueueChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
DefaultChannelConfig
setMaxMessagesPerRead在界面
ChannelConfig
setMaxMessagesPerRead在课堂上
DefaultChannelConfig
public KQueueChannelConfig setWriteSpinCount(int writeSpinCount)
ChannelConfig
WritableByteChannel.write(ByteBuffer)返回非零值。
它类似于在并发编程中使用自旋锁。
它可以提高内存利用率并根据运行JVM的平台来编写吞吐量。
默认值是16 。
setWriteSpinCount ,界面
ChannelConfig
setWriteSpinCount在课堂
DefaultChannelConfig
public KQueueChannelConfig setAllocator(ByteBufAllocator allocator)
ChannelConfig
ByteBufAllocator 。
setAllocator ,界面
ChannelConfig
setAllocator在类
DefaultChannelConfig
public KQueueChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator)
ChannelConfig复制的描述
RecvByteBufAllocator 。
setRecvByteBufAllocator ,界面
ChannelConfig
setRecvByteBufAllocator在课堂上
DefaultChannelConfig
public KQueueChannelConfig setAutoRead(boolean autoRead)
ChannelConfig
ChannelHandlerContext.read(),以便用户应用程序根本不需要调用它。
默认值是true 。
setAutoRead在界面
ChannelConfig
setAutoRead在课堂上
DefaultChannelConfig
@Deprecated public KQueueChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
ChannelConfig复制的描述
设置写入缓冲区的高位标记。 如果写入缓冲区中排队的字节数超过此值,则Channel.isWritable()将开始返回false 。
setWriteBufferHighWaterMark在界面
ChannelConfig
setWriteBufferHighWaterMark在课堂
DefaultChannelConfig
@Deprecated public KQueueChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
ChannelConfig
设置写入缓冲区的低水位标志。 一旦写入缓冲器中排队的字节数超过了high water mark ,然后下降到此值以下, Channel.isWritable()将再次开始返回true 。
setWriteBufferLowWaterMark在界面
ChannelConfig
setWriteBufferLowWaterMark在课堂上
DefaultChannelConfig
public KQueueChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)
ChannelConfig复制的描述
WriteBufferWaterMark ,用于设置写入缓冲区的高位和低位水印。
setWriteBufferWaterMark在界面
ChannelConfig
setWriteBufferWaterMark在课堂
DefaultChannelConfig
public KQueueChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator)
ChannelConfig
MessageSizeEstimator以检测消息的大小。
setMessageSizeEstimator ,界面
ChannelConfig
setMessageSizeEstimator在课堂上
DefaultChannelConfig
protected final void autoReadCleared()
DefaultChannelConfig
DefaultChannelConfig.setAutoRead(boolean)被称为与
false和
DefaultChannelConfig.isAutoRead()为
true之前。
Copyright © 2008–2018 The Netty Project. All rights reserved.