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 booleanprivate static final io.netty.channel.RecvByteBufAllocatorprivate intFields inherited from class io.netty.channel.DefaultChannelConfig
channel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleanintGet the maximumDatagramPacketsize.<T> TgetOption(io.netty.channel.ChannelOption<T> option) intintintintbooleanbooleanbooleanbooleanbooleanbooleanReturnstrueif the SO_REUSEPORT option is set.private voidsetActiveOnOpen(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 maximumDatagramPacketsize.setMaxMessagesPerRead(int maxMessagesPerRead) Deprecated.setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator) setNetworkInterface(NetworkInterface networkInterface) <T> booleansetOption(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, validateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
getOption
public <T> T getOption(io.netty.channel.ChannelOption<T> option) - Specified by:
getOptionin interfaceio.netty.channel.ChannelConfig- Overrides:
getOptionin classio.netty.channel.DefaultChannelConfig
-
setOption
public <T> boolean setOption(io.netty.channel.ChannelOption<T> option, T value) - Specified by:
setOptionin interfaceio.netty.channel.ChannelConfig- Overrides:
setOptionin classio.netty.channel.DefaultChannelConfig
-
setActiveOnOpen
private void setActiveOnOpen(boolean activeOnOpen) -
getActiveOnOpen
boolean getActiveOnOpen() -
setMessageSizeEstimator
public IOUringDatagramChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator) - Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setMessageSizeEstimatorin interfaceio.netty.channel.socket.DatagramChannelConfig- Overrides:
setMessageSizeEstimatorin classio.netty.channel.DefaultChannelConfig
-
setWriteBufferLowWaterMark
@Deprecated public IOUringDatagramChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark) Deprecated.- Specified by:
setWriteBufferLowWaterMarkin interfaceio.netty.channel.ChannelConfig- Overrides:
setWriteBufferLowWaterMarkin classio.netty.channel.DefaultChannelConfig
-
setWriteBufferHighWaterMark
@Deprecated public IOUringDatagramChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark) Deprecated.- Specified by:
setWriteBufferHighWaterMarkin interfaceio.netty.channel.ChannelConfig- Overrides:
setWriteBufferHighWaterMarkin classio.netty.channel.DefaultChannelConfig
-
setWriteBufferWaterMark
public IOUringDatagramChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark) - Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteBufferWaterMarkin interfaceio.netty.channel.socket.DatagramChannelConfig- Overrides:
setWriteBufferWaterMarkin classio.netty.channel.DefaultChannelConfig
-
setAutoClose
- Specified by:
setAutoClosein interfaceio.netty.channel.ChannelConfig- Specified by:
setAutoClosein interfaceio.netty.channel.socket.DatagramChannelConfig- Overrides:
setAutoClosein classio.netty.channel.DefaultChannelConfig
-
setAutoRead
- Specified by:
setAutoReadin interfaceio.netty.channel.ChannelConfig- Specified by:
setAutoReadin interfaceio.netty.channel.socket.DatagramChannelConfig- Overrides:
setAutoReadin classio.netty.channel.DefaultChannelConfig
-
setRecvByteBufAllocator
public IOUringDatagramChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator) - Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setRecvByteBufAllocatorin interfaceio.netty.channel.socket.DatagramChannelConfig- Overrides:
setRecvByteBufAllocatorin classio.netty.channel.DefaultChannelConfig
-
setWriteSpinCount
- Specified by:
setWriteSpinCountin interfaceio.netty.channel.ChannelConfig- Specified by:
setWriteSpinCountin interfaceio.netty.channel.socket.DatagramChannelConfig- Overrides:
setWriteSpinCountin classio.netty.channel.DefaultChannelConfig
-
setAllocator
- Specified by:
setAllocatorin interfaceio.netty.channel.ChannelConfig- Specified by:
setAllocatorin interfaceio.netty.channel.socket.DatagramChannelConfig- Overrides:
setAllocatorin classio.netty.channel.DefaultChannelConfig
-
setConnectTimeoutMillis
- Specified by:
setConnectTimeoutMillisin interfaceio.netty.channel.ChannelConfig- Specified by:
setConnectTimeoutMillisin interfaceio.netty.channel.socket.DatagramChannelConfig- Overrides:
setConnectTimeoutMillisin classio.netty.channel.DefaultChannelConfig
-
setMaxMessagesPerRead
Deprecated.- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.ChannelConfig- Specified by:
setMaxMessagesPerReadin interfaceio.netty.channel.socket.DatagramChannelConfig- Overrides:
setMaxMessagesPerReadin classio.netty.channel.DefaultChannelConfig
-
getSendBufferSize
public int getSendBufferSize()- Specified by:
getSendBufferSizein interfaceio.netty.channel.socket.DatagramChannelConfig
-
setSendBufferSize
- Specified by:
setSendBufferSizein interfaceio.netty.channel.socket.DatagramChannelConfig
-
getReceiveBufferSize
public int getReceiveBufferSize()- Specified by:
getReceiveBufferSizein interfaceio.netty.channel.socket.DatagramChannelConfig
-
setReceiveBufferSize
- Specified by:
setReceiveBufferSizein interfaceio.netty.channel.socket.DatagramChannelConfig
-
getTrafficClass
public int getTrafficClass()- Specified by:
getTrafficClassin interfaceio.netty.channel.socket.DatagramChannelConfig
-
setTrafficClass
- Specified by:
setTrafficClassin interfaceio.netty.channel.socket.DatagramChannelConfig
-
isReuseAddress
public boolean isReuseAddress()- Specified by:
isReuseAddressin interfaceio.netty.channel.socket.DatagramChannelConfig
-
setReuseAddress
- Specified by:
setReuseAddressin interfaceio.netty.channel.socket.DatagramChannelConfig
-
isBroadcast
public boolean isBroadcast()- Specified by:
isBroadcastin interfaceio.netty.channel.socket.DatagramChannelConfig
-
setBroadcast
- Specified by:
setBroadcastin interfaceio.netty.channel.socket.DatagramChannelConfig
-
isLoopbackModeDisabled
public boolean isLoopbackModeDisabled()- Specified by:
isLoopbackModeDisabledin interfaceio.netty.channel.socket.DatagramChannelConfig
-
setLoopbackModeDisabled
- Specified by:
setLoopbackModeDisabledin interfaceio.netty.channel.socket.DatagramChannelConfig
-
getTimeToLive
public int getTimeToLive()- Specified by:
getTimeToLivein interfaceio.netty.channel.socket.DatagramChannelConfig
-
setTimeToLive
- Specified by:
setTimeToLivein interfaceio.netty.channel.socket.DatagramChannelConfig
-
getInterface
- Specified by:
getInterfacein interfaceio.netty.channel.socket.DatagramChannelConfig
-
setInterface
- Specified by:
setInterfacein interfaceio.netty.channel.socket.DatagramChannelConfig
-
getNetworkInterface
- Specified by:
getNetworkInterfacein interfaceio.netty.channel.socket.DatagramChannelConfig
-
setNetworkInterface
- Specified by:
setNetworkInterfacein interfaceio.netty.channel.socket.DatagramChannelConfig
-
isReusePort
public boolean isReusePort()Returnstrueif the SO_REUSEPORT option is set. -
setReusePort
Set the SO_REUSEPORT option on the underlying Channel. This will allow to bind multipleDatagramChannels to the same port and so receive datagrams with multiple threads. Be aware this method needs be called beforeChannelOutboundInvoker.bind(java.net.SocketAddress)to have any affect. -
isIpTransparent
public boolean isIpTransparent() -
setIpTransparent
-
isFreeBind
public boolean isFreeBind() -
setFreeBind
-
setMaxDatagramPayloadSize
Set the maximumDatagramPacketsize. This will be used to determine if a batch ofIORING_IO_RECVMSGshould be used when reading from the underlying socket. When batchedrecvmmsgis used we may be able to read multipleDatagramPackets with one syscall and so greatly improve the performance. This number will be used to sliceByteBufs returned by the usedRecvByteBufAllocator. You can use0to disable the usage of batching, any other bigger value will enable it. -
getMaxDatagramPayloadSize
public int getMaxDatagramPayloadSize()Get the maximumDatagramPacketsize.
-