Top Fields Constructors Methods
io.netty.channel.kqueue

public final Class KQueueDatagramChannelConfig

extends KQueueChannelConfig
implements DatagramChannelConfig
Class Inheritance
All Implemented Interfaces
io.netty.channel.socket.DatagramChannelConfig, io.netty.channel.ChannelConfig
Annotations
@UnstableApi
Imports
io.netty.buffer.ByteBufAllocator, io.netty.channel.ChannelException, .ChannelOption, .FixedRecvByteBufAllocator, .MessageSizeEstimator, .RecvByteBufAllocator, .WriteBufferWaterMark, io.netty.channel.socket.DatagramChannelConfig, io.netty.util.internal.UnstableApi, java.io.IOException, java.net.InetAddress, .NetworkInterface, java.util.Map

Field Summary

Modifier and TypeField and Description
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
public InetAddress
getInterface()

Implements io.netty.channel.socket.DatagramChannelConfig.getInterface.

Gets the address of the network interface used for multicast packets.
public NetworkInterface
public <T> T
public Map<ChannelOption<?>, Object>
public int
public int
public int
public int
public boolean
public boolean
public boolean
public boolean
isReusePort()

Returns true if the SO_REUSEPORT option is set.

private void
setActiveOnOpen(boolean activeOnOpen)

public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
setAutoClose(boolean autoClose)

Overrides io.netty.channel.DefaultChannelConfig.setAutoClose.

Implements io.netty.channel.socket.DatagramChannelConfig.setAutoClose, io.netty.channel.ChannelConfig.setAutoClose.

Sets whether the Channel should be closed automatically and immediately on write failure.
public KQueueDatagramChannelConfig
setAutoRead(boolean autoRead)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setAutoRead.

Implements io.netty.channel.socket.DatagramChannelConfig.setAutoRead, io.netty.channel.ChannelConfig.setAutoRead.

Sets if ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't need to call it at all.
public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
setConnectTimeoutMillis(int
the connect timeout in milliseconds. 0 to disable.
connectTimeoutMillis
)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setConnectTimeoutMillis.

Implements io.netty.channel.socket.DatagramChannelConfig.setConnectTimeoutMillis, io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Sets the connect timeout of the channel in milliseconds.
public KQueueDatagramChannelConfig
setInterface(InetAddress interfaceAddress)

Implements io.netty.channel.socket.DatagramChannelConfig.setInterface.

Sets the address of the network interface used for multicast packets.
public DatagramChannelConfig
setLoopbackModeDisabled(boolean
true if and only if the loopback mode has been disabled
loopbackModeDisabled
)

Implements io.netty.channel.socket.DatagramChannelConfig.setLoopbackModeDisabled.

Sets the StandardSocketOptions#IP_MULTICAST_LOOP option.
public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
setMaxMessagesPerWrite(int maxMessagesPerWrite)

Overrides io.netty.channel.DefaultChannelConfig.setMaxMessagesPerWrite.

Set the maximum number of message to write per eventloop run.
public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
public <T> boolean
setOption(ChannelOption<T> option, T value)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setOption.

Implements io.netty.channel.ChannelConfig.setOption.

Sets a configuration property with the specified name and value.
public KQueueDatagramChannelConfig
setRcvAllocTransportProvidesGuess(boolean transportProvidesGuess)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setRcvAllocTransportProvidesGuess.

If this is true then the RecvByteBufAllocator.Handle#guess() will be overridden to always attempt to read as many bytes as kqueue says are available.
public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
setReusePort(boolean reusePort)

Set the SO_REUSEPORT option on the underlying Channel.

public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
setWriteBufferHighWaterMark(int writeBufferHighWaterMark)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setWriteBufferHighWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Deprecated

Sets the high water mark of the write buffer.

public KQueueDatagramChannelConfig
setWriteBufferLowWaterMark(int writeBufferLowWaterMark)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setWriteBufferLowWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Deprecated

Sets the low water mark of the write buffer.

public KQueueDatagramChannelConfig
public KQueueDatagramChannelConfig
Inherited from io.netty.channel.kqueue.KQueueChannelConfig:
autoReadClearedgetMaxBytesPerGatheringWritegetRcvAllocTransportProvidesGuesssetMaxBytesPerGatheringWrite

Field Detail

activeOnOpenback to summary
private boolean activeOnOpen

Constructor Detail

KQueueDatagramChannelConfigback to summary
pack-priv KQueueDatagramChannelConfig(KQueueDatagramChannel channel)

Method Detail

getActiveOnOpenback to summary
pack-priv boolean getActiveOnOpen()
getInterfaceback to summary
public InetAddress getInterface()

Implements io.netty.channel.socket.DatagramChannelConfig.getInterface.

Doc from io.netty.channel.socket.DatagramChannelConfig.getInterface.

Gets the address of the network interface used for multicast packets.

Annotations
@Override
getNetworkInterfaceback to summary
public NetworkInterface getNetworkInterface()

Implements io.netty.channel.socket.DatagramChannelConfig.getNetworkInterface.

Doc from io.netty.channel.socket.DatagramChannelConfig.getNetworkInterface.

Gets the StandardSocketOptions#IP_MULTICAST_IF option.

Annotations
@Override
getOptionback to summary
public <T> T getOption(ChannelOption<T> option)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.getOption.

Implements io.netty.channel.ChannelConfig.getOption.

Doc from io.netty.channel.ChannelConfig.getOption.

Return the value of the given ChannelOption

Annotations
@SuppressWarnings:unchecked, deprecation
@Override
getOptionsback to summary
public Map<ChannelOption<?>, Object> getOptions()

Overrides io.netty.channel.kqueue.KQueueChannelConfig.getOptions.

Implements io.netty.channel.ChannelConfig.getOptions.

Doc from io.netty.channel.ChannelConfig.getOptions.

Return all set ChannelOption's.

Annotations
@Override
@SuppressWarnings:deprecation
getReceiveBufferSizeback to summary
public int getReceiveBufferSize()

Implements io.netty.channel.socket.DatagramChannelConfig.getReceiveBufferSize.

Doc from io.netty.channel.socket.DatagramChannelConfig.getReceiveBufferSize.

Gets the StandardSocketOptions#SO_RCVBUF option.

Annotations
@Override
getSendBufferSizeback to summary
public int getSendBufferSize()

Implements io.netty.channel.socket.DatagramChannelConfig.getSendBufferSize.

Doc from io.netty.channel.socket.DatagramChannelConfig.getSendBufferSize.

Gets the StandardSocketOptions#SO_SNDBUF option.

Annotations
@Override
getTimeToLiveback to summary
public int getTimeToLive()

Implements io.netty.channel.socket.DatagramChannelConfig.getTimeToLive.

Doc from io.netty.channel.socket.DatagramChannelConfig.getTimeToLive.

Gets the StandardSocketOptions#IP_MULTICAST_TTL option.

Annotations
@Override
getTrafficClassback to summary
public int getTrafficClass()

Implements io.netty.channel.socket.DatagramChannelConfig.getTrafficClass.

Doc from io.netty.channel.socket.DatagramChannelConfig.getTrafficClass.

Gets the StandardSocketOptions#IP_TOS option.

Annotations
@Override
isBroadcastback to summary
public boolean isBroadcast()

Implements io.netty.channel.socket.DatagramChannelConfig.isBroadcast.

Doc from io.netty.channel.socket.DatagramChannelConfig.isBroadcast.

Gets the StandardSocketOptions#SO_BROADCAST option.

Annotations
@Override
isLoopbackModeDisabledback to summary
public boolean isLoopbackModeDisabled()

Implements io.netty.channel.socket.DatagramChannelConfig.isLoopbackModeDisabled.

Doc from io.netty.channel.socket.DatagramChannelConfig.isLoopbackModeDisabled.

Gets the StandardSocketOptions#IP_MULTICAST_LOOP option.

Returns:boolean

true if and only if the loopback mode has been disabled

Annotations
@Override
isReuseAddressback to summary
public boolean isReuseAddress()

Implements io.netty.channel.socket.DatagramChannelConfig.isReuseAddress.

Doc from io.netty.channel.socket.DatagramChannelConfig.isReuseAddress.

Gets the StandardSocketOptions#SO_REUSEADDR option.

Annotations
@Override
isReusePortback to summary
public boolean isReusePort()

Returns true if the SO_REUSEPORT option is set.

setActiveOnOpenback to summary
private void setActiveOnOpen(boolean activeOnOpen)
setAllocatorback to summary
public KQueueDatagramChannelConfig setAllocator(ByteBufAllocator allocator)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setAllocator.

Implements io.netty.channel.socket.DatagramChannelConfig.setAllocator, io.netty.channel.ChannelConfig.setAllocator.

Doc from io.netty.channel.ChannelConfig.setAllocator.

Set the ByteBufAllocator which is used for the channel to allocate buffers.

Annotations
@Override
setAutoCloseback to summary
public KQueueDatagramChannelConfig setAutoClose(boolean autoClose)

Overrides io.netty.channel.DefaultChannelConfig.setAutoClose.

Implements io.netty.channel.socket.DatagramChannelConfig.setAutoClose, io.netty.channel.ChannelConfig.setAutoClose.

Doc from io.netty.channel.ChannelConfig.setAutoClose.

Sets whether the Channel should be closed automatically and immediately on write failure. The default is true.

Annotations
@Override
setAutoReadback to summary
public KQueueDatagramChannelConfig setAutoRead(boolean autoRead)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setAutoRead.

Implements io.netty.channel.socket.DatagramChannelConfig.setAutoRead, io.netty.channel.ChannelConfig.setAutoRead.

Doc from io.netty.channel.ChannelConfig.setAutoRead.

Sets if ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't need to call it at all. The default value is true.

Annotations
@Override
setBroadcastback to summary
public KQueueDatagramChannelConfig setBroadcast(boolean broadcast)

Implements io.netty.channel.socket.DatagramChannelConfig.setBroadcast.

Doc from io.netty.channel.socket.DatagramChannelConfig.setBroadcast.

Sets the StandardSocketOptions#SO_BROADCAST option.

Annotations
@Override
setConnectTimeoutMillisback to summary
public KQueueDatagramChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setConnectTimeoutMillis.

Implements io.netty.channel.socket.DatagramChannelConfig.setConnectTimeoutMillis, io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Doc from io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Sets the connect timeout of the channel in milliseconds. If the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.

Parameters
connectTimeoutMillis:int

the connect timeout in milliseconds. 0 to disable.

Annotations
@Override
setInterfaceback to summary
public KQueueDatagramChannelConfig setInterface(InetAddress interfaceAddress)

Implements io.netty.channel.socket.DatagramChannelConfig.setInterface.

Doc from io.netty.channel.socket.DatagramChannelConfig.setInterface.

Sets the address of the network interface used for multicast packets.

Annotations
@Override
setLoopbackModeDisabledback to summary
public DatagramChannelConfig setLoopbackModeDisabled(boolean loopbackModeDisabled)

Implements io.netty.channel.socket.DatagramChannelConfig.setLoopbackModeDisabled.

Doc from io.netty.channel.socket.DatagramChannelConfig.setLoopbackModeDisabled.

Sets the StandardSocketOptions#IP_MULTICAST_LOOP option.

Parameters
loopbackModeDisabled:boolean

true if and only if the loopback mode has been disabled

Annotations
@Override
setMaxMessagesPerReadback to summary
public KQueueDatagramChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setMaxMessagesPerRead.

Implements io.netty.channel.socket.DatagramChannelConfig.setMaxMessagesPerRead, io.netty.channel.ChannelConfig.setMaxMessagesPerRead.

Doc from io.netty.channel.DefaultChannelConfig.setMaxMessagesPerRead.

Deprecated

Annotations
@Override
@Deprecated
setMaxMessagesPerWriteback to summary
public KQueueDatagramChannelConfig setMaxMessagesPerWrite(int maxMessagesPerWrite)

Overrides io.netty.channel.DefaultChannelConfig.setMaxMessagesPerWrite.

Doc from io.netty.channel.DefaultChannelConfig.setMaxMessagesPerWrite.

Set the maximum number of message to write per eventloop run. Once this limit is reached we will continue to process other events before trying to write the remaining messages.

Annotations
@Override
setMessageSizeEstimatorback to summary
public KQueueDatagramChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setMessageSizeEstimator.

Implements io.netty.channel.socket.DatagramChannelConfig.setMessageSizeEstimator, io.netty.channel.ChannelConfig.setMessageSizeEstimator.

Doc from io.netty.channel.ChannelConfig.setMessageSizeEstimator.

Set the MessageSizeEstimator which is used for the channel to detect the size of a message.

Annotations
@Override
setNetworkInterfaceback to summary
public KQueueDatagramChannelConfig setNetworkInterface(NetworkInterface networkInterface)

Implements io.netty.channel.socket.DatagramChannelConfig.setNetworkInterface.

Doc from io.netty.channel.socket.DatagramChannelConfig.setNetworkInterface.

Sets the StandardSocketOptions#IP_MULTICAST_IF option.

Annotations
@Override
setOptionback to summary
public <T> boolean setOption(ChannelOption<T> option, T value)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setOption.

Implements io.netty.channel.ChannelConfig.setOption.

Doc from io.netty.channel.ChannelConfig.setOption.

Sets a configuration property with the specified name and value. To override this method properly, you must call the super class:

public boolean setOption(ChannelOption<T> option, T value) {
    if (super.setOption(option, value)) {
        return true;
    }

    if (option.equals(additionalOption)) {
        ....
        return true;
    }

    return false;
}
Returns:boolean

true if and only if the property has been set

Annotations
@Override
@SuppressWarnings:deprecation
setRcvAllocTransportProvidesGuessback to summary
public KQueueDatagramChannelConfig setRcvAllocTransportProvidesGuess(boolean transportProvidesGuess)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setRcvAllocTransportProvidesGuess.

Doc from io.netty.channel.kqueue.KQueueChannelConfig.setRcvAllocTransportProvidesGuess.

If this is true then the RecvByteBufAllocator.Handle#guess() will be overridden to always attempt to read as many bytes as kqueue says are available.

Annotations
@Override
setReceiveBufferSizeback to summary
public KQueueDatagramChannelConfig setReceiveBufferSize(int receiveBufferSize)

Implements io.netty.channel.socket.DatagramChannelConfig.setReceiveBufferSize.

Doc from io.netty.channel.socket.DatagramChannelConfig.setReceiveBufferSize.

Sets the StandardSocketOptions#SO_RCVBUF option.

Annotations
@Override
setRecvByteBufAllocatorback to summary
public KQueueDatagramChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setRecvByteBufAllocator.

Implements io.netty.channel.socket.DatagramChannelConfig.setRecvByteBufAllocator, io.netty.channel.ChannelConfig.setRecvByteBufAllocator.

Doc from io.netty.channel.ChannelConfig.setRecvByteBufAllocator.

Set the RecvByteBufAllocator which is used for the channel to allocate receive buffers.

Annotations
@Override
setReuseAddressback to summary
public KQueueDatagramChannelConfig setReuseAddress(boolean reuseAddress)

Implements io.netty.channel.socket.DatagramChannelConfig.setReuseAddress.

Doc from io.netty.channel.socket.DatagramChannelConfig.setReuseAddress.

Gets the StandardSocketOptions#SO_REUSEADDR option.

Annotations
@Override
setReusePortback to summary
public KQueueDatagramChannelConfig setReusePort(boolean reusePort)

Set the SO_REUSEPORT option on the underlying Channel. This will allow to bind multiple KQueueSocketChannels to the same port and so accept connections with multiple threads. Be aware this method needs be called before KQueueDatagramChannel#bind(java.net.SocketAddress) to have any affect.

setSendBufferSizeback to summary
public KQueueDatagramChannelConfig setSendBufferSize(int sendBufferSize)

Implements io.netty.channel.socket.DatagramChannelConfig.setSendBufferSize.

Doc from io.netty.channel.socket.DatagramChannelConfig.setSendBufferSize.

Sets the StandardSocketOptions#SO_SNDBUF option.

Annotations
@Override
setTimeToLiveback to summary
public KQueueDatagramChannelConfig setTimeToLive(int ttl)

Implements io.netty.channel.socket.DatagramChannelConfig.setTimeToLive.

Doc from io.netty.channel.socket.DatagramChannelConfig.setTimeToLive.

Sets the StandardSocketOptions#IP_MULTICAST_TTL option.

Annotations
@Override
setTrafficClassback to summary
public KQueueDatagramChannelConfig setTrafficClass(int trafficClass)

Implements io.netty.channel.socket.DatagramChannelConfig.setTrafficClass.

Doc from io.netty.channel.socket.DatagramChannelConfig.setTrafficClass.

Sets the StandardSocketOptions#IP_TOS option.

Annotations
@Override
setWriteBufferHighWaterMarkback to summary
public KQueueDatagramChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setWriteBufferHighWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Deprecated

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 return false.

Annotations
@Override
@Deprecated
setWriteBufferLowWaterMarkback to summary
public KQueueDatagramChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setWriteBufferLowWaterMark.

Implements io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Deprecated

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 to return true again.

Annotations
@Override
@Deprecated
setWriteBufferWaterMarkback to summary
public KQueueDatagramChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setWriteBufferWaterMark.

Implements io.netty.channel.socket.DatagramChannelConfig.setWriteBufferWaterMark, io.netty.channel.ChannelConfig.setWriteBufferWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferWaterMark.

Set the WriteBufferWaterMark which is used for setting the high and low water mark of the write buffer.

Annotations
@Override
setWriteSpinCountback to summary
public KQueueDatagramChannelConfig setWriteSpinCount(int writeSpinCount)

Overrides io.netty.channel.kqueue.KQueueChannelConfig.setWriteSpinCount.

Implements io.netty.channel.socket.DatagramChannelConfig.setWriteSpinCount, io.netty.channel.ChannelConfig.setWriteSpinCount.

Doc from io.netty.channel.ChannelConfig.setWriteSpinCount.

Sets the maximum loop count for a write operation until 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.

Annotations
@Override