|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
public interface NioSocketChannelConfig
一个NIO TCP/IP SocketChannel
的SocketChannelConfig
.
ChannelConfig
和SocketChannelConfig
还提供其他的属性,
NioSocketChannelConfig
有以下属性:
名称 | 关联setter方法 |
---|---|
"writeBufferHighWaterMark" |
setWriteBufferHighWaterMark(int) |
"writeBufferLowWaterMark" |
setWriteBufferLowWaterMark(int) |
"writeSpinCount" |
setWriteSpinCount(int) |
"receiveBufferSizePredictor" |
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor) |
"receiveBufferSizePredictorFactory" |
setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory)
|
从接口 org.jboss.netty.channel.socket.SocketChannelConfig 继承的方法 |
---|
getReceiveBufferSize, getSendBufferSize, getSoLinger, getTrafficClass, isKeepAlive, isReuseAddress, isTcpNoDelay, setKeepAlive, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoLinger, setTcpNoDelay, setTrafficClass |
从接口 org.jboss.netty.channel.ChannelConfig 继承的方法 |
---|
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory |
方法详细信息 |
---|
int getWriteBufferHighWaterMark()
Channel.isWritable()
会开始返回
true
.
void setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Channel.isWritable()
会开始返回
true
.
int getWriteBufferLowWaterMark()
Channel.isWritable()
会重新返回true
.
void setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Channel.isWritable()
会重新返回true
.
int getWriteSpinCount()
WritableByteChannel.write(ByteBuffer)
返回一个非零值为止.它类似在并发编程里使用什么样的自旋锁.它利用JVM所运行的平台改善内存利用率和写的吞吐量.默认值为16
.
void setWriteSpinCount(int writeSpinCount)
WritableByteChannel.write(ByteBuffer)
返回一个非零值为止.它类似在并发编程里使用什么样的自旋锁.它利用JVM所运行的平台改善内存利用率和写的吞吐量.默认值为16
.
java.lang.IllegalArgumentException
- 如果指定的值是0
或小于0
,则抛出异常ReceiveBufferSizePredictor getReceiveBufferSizePredictor()
ReceiveBufferSizePredictor
.默认预测机是
AdaptiveReceiveBufferSizePredictor
(64, 1024, 65536).
void setReceiveBufferSizePredictor(ReceiveBufferSizePredictor predictor)
ReceiveBufferSizePredictor
.默认预测机是
AdaptiveReceiveBufferSizePredictor
(64, 1024, 65536).
ReceiveBufferSizePredictorFactory getReceiveBufferSizePredictorFactory()
ReceiveBufferSizePredictor
没有被设置时创建一个新的
ReceiveBufferSizePredictor
的
ReceiveBufferSizePredictorFactory
.如果该通道没有设置预测机,带有新预测机的
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
方法会被调用.
默认工厂是
AdaptiveReceiveBufferSizePredictorFactory
(64, 1024, 65536)
.
void setReceiveBufferSizePredictorFactory(ReceiveBufferSizePredictorFactory predictorFactory)
ReceiveBufferSizePredictor
没有被设置时创建一个新的
ReceiveBufferSizePredictor
的
ReceiveBufferSizePredictorFactory
.如果该通道没有设置预测机,带有新预测机的
setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)
方法会被调用.
默认工厂是
AdaptiveReceiveBufferSizePredictorFactory
(64, 1024, 65536)
.
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |