Interface NioChannelConfig
-
- All Superinterfaces:
ChannelConfig
- All Known Subinterfaces:
NioDatagramChannelConfig,NioSocketChannelConfig
- All Known Implementing Classes:
DefaultNioDatagramChannelConfig,DefaultNioSocketChannelConfig
public interface NioChannelConfig extends ChannelConfig
SpecialChannelConfigsub-type which offers extra methods which are useful for NIO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetWriteBufferHighWaterMark()Returns the high water mark of the write buffer.intgetWriteBufferLowWaterMark()Returns the low water mark of the write buffer.intgetWriteSpinCount()Returns the maximum loop count for a write operation untilWritableByteChannel.write(ByteBuffer)returns a non-zero value.voidsetWriteBufferHighWaterMark(int writeBufferHighWaterMark)Sets the high water mark of the write buffer.voidsetWriteBufferLowWaterMark(int writeBufferLowWaterMark)Sets the low water mark of the write buffer.voidsetWriteSpinCount(int writeSpinCount)Sets the maximum loop count for a write operation untilWritableByteChannel.write(ByteBuffer)returns a non-zero value.-
Methods inherited from interface org.jboss.netty.channel.ChannelConfig
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory
-
-
-
-
Method Detail
-
getWriteBufferHighWaterMark
int getWriteBufferHighWaterMark()
Returns 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 returnfalse.
-
setWriteBufferHighWaterMark
void setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
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 returnfalse.
-
getWriteBufferLowWaterMark
int getWriteBufferLowWaterMark()
Returns 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 returntrueagain.
-
setWriteBufferLowWaterMark
void setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
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 toreturntrueagain.
-
getWriteSpinCount
int getWriteSpinCount()
Returns the maximum loop count for a write operation untilWritableByteChannel.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 is16.
-
setWriteSpinCount
void setWriteSpinCount(int writeSpinCount)
Sets the maximum loop count for a write operation untilWritableByteChannel.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 is16.- Throws:
java.lang.IllegalArgumentException- if the specified value is0or less than0
-
-