public interface UdtServerChannelConfig extends UdtChannelConfig
ChannelConfig for a UdtServerChannel.
Note that TypeUDT.DATAGRAM message oriented channels treat
"receiveBufferSize" and "sendBufferSize" as maximum message
size. If received or sent message does not fit specified sizes,
ChannelException will be thrown.
| Modifier and Type | Method and Description |
|---|---|
int |
getBacklog()
Gets
KindUDT.ACCEPTOR channel backlog via
ChannelOption.SO_BACKLOG. |
UdtServerChannelConfig |
setAllocator(ByteBufAllocator allocator)
Set the
ByteBufAllocator which is used for the channel
to allocate buffers. |
UdtServerChannelConfig |
setAutoRead(boolean autoRead)
Sets if
ChannelOutboundInvoker.read() will be invoked automatically so that a user application doesn't
need to call it at all. |
UdtServerChannelConfig |
setBacklog(int backlog)
Sets
KindUDT.ACCEPTOR channel backlog via
ChannelOption.SO_BACKLOG. |
UdtServerChannelConfig |
setConnectTimeoutMillis(int connectTimeoutMillis)
Sets the connect timeout of the channel in milliseconds.
|
UdtServerChannelConfig |
setMaxMessagesPerRead(int maxMessagesPerRead)
Sets the maximum number of messages in a
MessageList of
a channelRead() event. |
UdtServerChannelConfig |
setProtocolReceiveBufferSize(int size)
Sets
OptionUDT.Protocol_Receive_Buffer_Size |
UdtServerChannelConfig |
setProtocolSendBufferSize(int size)
Sets
OptionUDT.Protocol_Send_Buffer_Size |
UdtServerChannelConfig |
setReceiveBufferSize(int receiveBufferSize)
Sets the
ChannelOption.SO_RCVBUF option. |
UdtServerChannelConfig |
setRecvByteBufAllocator(RecvByteBufAllocator allocator)
Set the
ByteBufAllocator which is used for the channel
to allocate receive buffers. |
UdtServerChannelConfig |
setReuseAddress(boolean reuseAddress)
Sets the
ChannelOption.SO_REUSEADDR option. |
UdtServerChannelConfig |
setSendBufferSize(int sendBufferSize)
Sets the
ChannelOption.SO_SNDBUF option. |
UdtServerChannelConfig |
setSoLinger(int soLinger)
Sets the
ChannelOption.SO_LINGER option. |
UdtServerChannelConfig |
setSystemReceiveBufferSize(int size)
Sets
OptionUDT.System_Receive_Buffer_Size |
UdtServerChannelConfig |
setSystemSendBufferSize(int size)
Sets
OptionUDT.System_Send_Buffer_Size |
UdtServerChannelConfig |
setWriteSpinCount(int writeSpinCount)
Sets the maximum loop count for a write operation until
WritableByteChannel.write(ByteBuffer) returns a non-zero value. |
getProtocolReceiveBufferSize, getProtocolSendBufferSize, getReceiveBufferSize, getSendBufferSize, getSoLinger, getSystemReceiveBufferSize, getSystemSendBufferSize, isReuseAddressgetAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getOption, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteSpinCount, isAutoRead, setOption, setOptions, setWriteBufferHighWaterMark, setWriteBufferLowWaterMarkint getBacklog()
KindUDT.ACCEPTOR channel backlog via
ChannelOption.SO_BACKLOG.UdtServerChannelConfig setBacklog(int backlog)
KindUDT.ACCEPTOR channel backlog via
ChannelOption.SO_BACKLOG.UdtServerChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
ChannelConfigChannel does not support connect operation, this property is not
used at all, and therefore will be ignored.setConnectTimeoutMillis in interface ChannelConfigsetConnectTimeoutMillis in interface UdtChannelConfigconnectTimeoutMillis - the connect timeout in milliseconds.
0 to disable.UdtServerChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
ChannelConfigMessageList of
a channelRead() event.
If this value is greater than 1, an event loop might attempt to read multiple times to fill multiple messages
into the MessageList.setMaxMessagesPerRead in interface ChannelConfigsetMaxMessagesPerRead in interface UdtChannelConfigUdtServerChannelConfig setWriteSpinCount(int writeSpinCount)
ChannelConfigWritableByteChannel.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.setWriteSpinCount in interface ChannelConfigsetWriteSpinCount in interface UdtChannelConfigUdtServerChannelConfig setAllocator(ByteBufAllocator allocator)
ChannelConfigByteBufAllocator which is used for the channel
to allocate buffers.setAllocator in interface ChannelConfigsetAllocator in interface UdtChannelConfigUdtServerChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator)
ChannelConfigByteBufAllocator which is used for the channel
to allocate receive buffers.setRecvByteBufAllocator in interface ChannelConfigsetRecvByteBufAllocator in interface UdtChannelConfigUdtServerChannelConfig setAutoRead(boolean autoRead)
ChannelConfigChannelOutboundInvoker.read() will be invoked automatically so that a user application doesn't
need to call it at all. The default value is true.setAutoRead in interface ChannelConfigsetAutoRead in interface UdtChannelConfigUdtServerChannelConfig setProtocolReceiveBufferSize(int size)
UdtChannelConfigOptionUDT.Protocol_Receive_Buffer_SizesetProtocolReceiveBufferSize in interface UdtChannelConfigUdtServerChannelConfig setProtocolSendBufferSize(int size)
UdtChannelConfigOptionUDT.Protocol_Send_Buffer_SizesetProtocolSendBufferSize in interface UdtChannelConfigUdtServerChannelConfig setReceiveBufferSize(int receiveBufferSize)
UdtChannelConfigChannelOption.SO_RCVBUF option.setReceiveBufferSize in interface UdtChannelConfigUdtServerChannelConfig setReuseAddress(boolean reuseAddress)
UdtChannelConfigChannelOption.SO_REUSEADDR option.setReuseAddress in interface UdtChannelConfigUdtServerChannelConfig setSendBufferSize(int sendBufferSize)
UdtChannelConfigChannelOption.SO_SNDBUF option.setSendBufferSize in interface UdtChannelConfigUdtServerChannelConfig setSoLinger(int soLinger)
UdtChannelConfigChannelOption.SO_LINGER option.setSoLinger in interface UdtChannelConfigUdtServerChannelConfig setSystemReceiveBufferSize(int size)
UdtChannelConfigOptionUDT.System_Receive_Buffer_SizesetSystemReceiveBufferSize in interface UdtChannelConfigUdtServerChannelConfig setSystemSendBufferSize(int size)
UdtChannelConfigOptionUDT.System_Send_Buffer_SizesetSystemSendBufferSize in interface UdtChannelConfigCopyright © 2008–2013 The Netty Project. All rights reserved.