public interface NioChannelConfig extends ChannelConfig
ChannelConfig
sub-type which offers extra methods which are useful for NIO.Modifier and Type | Method and Description |
---|---|
int |
getWriteBufferHighWaterMark()
Returns the high water mark of the write buffer.
|
int |
getWriteBufferLowWaterMark()
Returns the low water mark of the write buffer.
|
int |
getWriteSpinCount()
Returns the maximum loop count for a write operation until
WritableByteChannel.write(ByteBuffer) returns a non-zero value. |
void |
setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Sets the high water mark of the write buffer.
|
void |
setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Sets the low water mark of the write buffer.
|
void |
setWriteSpinCount(int writeSpinCount)
Sets the maximum loop count for a write operation until
WritableByteChannel.write(ByteBuffer) returns a non-zero value. |
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory
int getWriteBufferHighWaterMark()
Channel.isWritable()
will start to return false
.void setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Channel.isWritable()
will start to return false
.int getWriteBufferLowWaterMark()
Channel.isWritable()
will start to return
true
again.void setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Channel.isWritable()
will start toreturn
true
again.int getWriteSpinCount()
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
.void setWriteSpinCount(int writeSpinCount)
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
.IllegalArgumentException
- if the specified value is 0
or less than 0
Copyright © 2008-2016 The Netty Project. All Rights Reserved.