Package io.netty.incubator.channel.uring
Class IOUringDatagramChannelConfig
java.lang.Object
io.netty.channel.DefaultChannelConfig
io.netty.incubator.channel.uring.IOUringDatagramChannelConfig
- All Implemented Interfaces:
io.netty.channel.ChannelConfig
,io.netty.channel.socket.DatagramChannelConfig
public final class IOUringDatagramChannelConfig
extends io.netty.channel.DefaultChannelConfig
implements io.netty.channel.socket.DatagramChannelConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private static final io.netty.channel.RecvByteBufAllocator
private int
Fields inherited from class io.netty.channel.DefaultChannelConfig
channel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
int
Get the maximumDatagramPacket
size.<T> T
getOption
(io.netty.channel.ChannelOption<T> option) int
int
int
int
boolean
boolean
boolean
boolean
boolean
boolean
Returnstrue
if the SO_REUSEPORT option is set.private void
setActiveOnOpen
(boolean activeOnOpen) setAllocator
(io.netty.buffer.ByteBufAllocator allocator) setAutoClose
(boolean autoClose) setAutoRead
(boolean autoRead) setBroadcast
(boolean broadcast) setConnectTimeoutMillis
(int connectTimeoutMillis) setFreeBind
(boolean freeBind) setInterface
(InetAddress interfaceAddress) setIpTransparent
(boolean ipTransparent) setLoopbackModeDisabled
(boolean loopbackModeDisabled) setMaxDatagramPayloadSize
(int maxDatagramSize) Set the maximumDatagramPacket
size.setMaxMessagesPerRead
(int maxMessagesPerRead) Deprecated.setMessageSizeEstimator
(io.netty.channel.MessageSizeEstimator estimator) setNetworkInterface
(NetworkInterface networkInterface) <T> boolean
setOption
(io.netty.channel.ChannelOption<T> option, T value) setReceiveBufferSize
(int receiveBufferSize) setRecvByteBufAllocator
(io.netty.channel.RecvByteBufAllocator allocator) setReuseAddress
(boolean reuseAddress) setReusePort
(boolean reusePort) Set the SO_REUSEPORT option on the underlying Channel.setSendBufferSize
(int sendBufferSize) setTimeToLive
(int ttl) setTrafficClass
(int trafficClass) setWriteBufferHighWaterMark
(int writeBufferHighWaterMark) Deprecated.setWriteBufferLowWaterMark
(int writeBufferLowWaterMark) Deprecated.setWriteBufferWaterMark
(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark) setWriteSpinCount
(int writeSpinCount) Methods inherited from class io.netty.channel.DefaultChannelConfig
autoReadCleared, getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMaxMessagesPerWrite, getMessageSizeEstimator, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setMaxMessagesPerWrite, setOptions, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelConfig
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setOptions
-
Field Details
-
DEFAULT_RCVBUF_ALLOCATOR
private static final io.netty.channel.RecvByteBufAllocator DEFAULT_RCVBUF_ALLOCATOR -
activeOnOpen
private boolean activeOnOpen -
maxDatagramSize
private volatile int maxDatagramSize
-
-
Constructor Details
-
IOUringDatagramChannelConfig
IOUringDatagramChannelConfig(AbstractIOUringChannel channel)
-
-
Method Details
-
getOptions
- Specified by:
getOptions
in interfaceio.netty.channel.ChannelConfig
- Overrides:
getOptions
in classio.netty.channel.DefaultChannelConfig
-
getOption
public <T> T getOption(io.netty.channel.ChannelOption<T> option) - Specified by:
getOption
in interfaceio.netty.channel.ChannelConfig
- Overrides:
getOption
in classio.netty.channel.DefaultChannelConfig
-
setOption
public <T> boolean setOption(io.netty.channel.ChannelOption<T> option, T value) - Specified by:
setOption
in interfaceio.netty.channel.ChannelConfig
- Overrides:
setOption
in classio.netty.channel.DefaultChannelConfig
-
setActiveOnOpen
private void setActiveOnOpen(boolean activeOnOpen) -
getActiveOnOpen
boolean getActiveOnOpen() -
setMessageSizeEstimator
public IOUringDatagramChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator) - Specified by:
setMessageSizeEstimator
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setMessageSizeEstimator
in interfaceio.netty.channel.socket.DatagramChannelConfig
- Overrides:
setMessageSizeEstimator
in classio.netty.channel.DefaultChannelConfig
-
setWriteBufferLowWaterMark
@Deprecated public IOUringDatagramChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark) Deprecated.- Specified by:
setWriteBufferLowWaterMark
in interfaceio.netty.channel.ChannelConfig
- Overrides:
setWriteBufferLowWaterMark
in classio.netty.channel.DefaultChannelConfig
-
setWriteBufferHighWaterMark
@Deprecated public IOUringDatagramChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark) Deprecated.- Specified by:
setWriteBufferHighWaterMark
in interfaceio.netty.channel.ChannelConfig
- Overrides:
setWriteBufferHighWaterMark
in classio.netty.channel.DefaultChannelConfig
-
setWriteBufferWaterMark
public IOUringDatagramChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark) - Specified by:
setWriteBufferWaterMark
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setWriteBufferWaterMark
in interfaceio.netty.channel.socket.DatagramChannelConfig
- Overrides:
setWriteBufferWaterMark
in classio.netty.channel.DefaultChannelConfig
-
setAutoClose
- Specified by:
setAutoClose
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setAutoClose
in interfaceio.netty.channel.socket.DatagramChannelConfig
- Overrides:
setAutoClose
in classio.netty.channel.DefaultChannelConfig
-
setAutoRead
- Specified by:
setAutoRead
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setAutoRead
in interfaceio.netty.channel.socket.DatagramChannelConfig
- Overrides:
setAutoRead
in classio.netty.channel.DefaultChannelConfig
-
setRecvByteBufAllocator
public IOUringDatagramChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator) - Specified by:
setRecvByteBufAllocator
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setRecvByteBufAllocator
in interfaceio.netty.channel.socket.DatagramChannelConfig
- Overrides:
setRecvByteBufAllocator
in classio.netty.channel.DefaultChannelConfig
-
setWriteSpinCount
- Specified by:
setWriteSpinCount
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setWriteSpinCount
in interfaceio.netty.channel.socket.DatagramChannelConfig
- Overrides:
setWriteSpinCount
in classio.netty.channel.DefaultChannelConfig
-
setAllocator
- Specified by:
setAllocator
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setAllocator
in interfaceio.netty.channel.socket.DatagramChannelConfig
- Overrides:
setAllocator
in classio.netty.channel.DefaultChannelConfig
-
setConnectTimeoutMillis
- Specified by:
setConnectTimeoutMillis
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setConnectTimeoutMillis
in interfaceio.netty.channel.socket.DatagramChannelConfig
- Overrides:
setConnectTimeoutMillis
in classio.netty.channel.DefaultChannelConfig
-
setMaxMessagesPerRead
Deprecated.- Specified by:
setMaxMessagesPerRead
in interfaceio.netty.channel.ChannelConfig
- Specified by:
setMaxMessagesPerRead
in interfaceio.netty.channel.socket.DatagramChannelConfig
- Overrides:
setMaxMessagesPerRead
in classio.netty.channel.DefaultChannelConfig
-
getSendBufferSize
public int getSendBufferSize()- Specified by:
getSendBufferSize
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
setSendBufferSize
- Specified by:
setSendBufferSize
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
getReceiveBufferSize
public int getReceiveBufferSize()- Specified by:
getReceiveBufferSize
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
setReceiveBufferSize
- Specified by:
setReceiveBufferSize
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
getTrafficClass
public int getTrafficClass()- Specified by:
getTrafficClass
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
setTrafficClass
- Specified by:
setTrafficClass
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
isReuseAddress
public boolean isReuseAddress()- Specified by:
isReuseAddress
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
setReuseAddress
- Specified by:
setReuseAddress
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
isBroadcast
public boolean isBroadcast()- Specified by:
isBroadcast
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
setBroadcast
- Specified by:
setBroadcast
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
isLoopbackModeDisabled
public boolean isLoopbackModeDisabled()- Specified by:
isLoopbackModeDisabled
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
setLoopbackModeDisabled
- Specified by:
setLoopbackModeDisabled
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
getTimeToLive
public int getTimeToLive()- Specified by:
getTimeToLive
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
setTimeToLive
- Specified by:
setTimeToLive
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
getInterface
- Specified by:
getInterface
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
setInterface
- Specified by:
setInterface
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
getNetworkInterface
- Specified by:
getNetworkInterface
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
setNetworkInterface
- Specified by:
setNetworkInterface
in interfaceio.netty.channel.socket.DatagramChannelConfig
-
isReusePort
public boolean isReusePort()Returnstrue
if the SO_REUSEPORT option is set. -
setReusePort
Set the SO_REUSEPORT option on the underlying Channel. This will allow to bind multipleDatagramChannel
s to the same port and so receive datagrams with multiple threads. Be aware this method needs be called beforeChannel.bind(java.net.SocketAddress)
to have any affect. -
isIpTransparent
public boolean isIpTransparent() -
setIpTransparent
-
isFreeBind
public boolean isFreeBind() -
setFreeBind
-
setMaxDatagramPayloadSize
Set the maximumDatagramPacket
size. This will be used to determine if a batch ofIORING_IO_RECVMSG
should be used when reading from the underlying socket. When batchedrecvmmsg
is used we may be able to read multipleDatagramPacket
s with one syscall and so greatly improve the performance. This number will be used to sliceByteBuf
s returned by the usedRecvByteBufAllocator
. You can use0
to disable the usage of batching, any other bigger value will enable it. -
getMaxDatagramPayloadSize
public int getMaxDatagramPayloadSize()Get the maximumDatagramPacket
size.
-