Package io.netty.channel.uring
io_uring is a high I/O performance scalable interface for fully
asynchronous Linux syscalls. While Netty 4.2 generally requires Java 8 or newer, this optional io_uring native
transport requires Java 9 or newer.
-
Interface Summary Interface Description CompletionCallback IoUringBufferRingAllocator Allocator that is responsible to allocate buffers for a buffer ring.IoUringIoHandle IoHandleimplementation for io_uring. -
Class Summary Class Description AbstractIoUringBufferRingAllocator Base class forIoUringBufferRingAllocatorimplementations which support large allocations.AbstractIoUringChannel AbstractIoUringChannel.DelayedClose AbstractIoUringServerChannel AbstractIoUringServerChannel.AcceptedAddressMemory AbstractIoUringStreamChannel AbstractIoUringStreamChannel.ByteBufWritableByteChannel AWritableByteChannelbacked by aByteBuf.CmsgHdr struct cmsghdr { socklen_t cmsg_len; // data byte count, including header int cmsg_level; //originating protocol int cmsg_type; // protocol-specific type // followed by unsigned char cmsg_data[]; };CompletionQueue Completion queue implementation for io_uring.IoUring IoUringAdaptiveBufferRingAllocator IoUringBufferRingAllocatorimplementation which uses an adaptive strategy to allocate buffers, which will decrease / increase the buffer size depending on if the allocated buffers were completely used or not before.IoUringBufferRing IoUringBufferRingConfig Configuration class for anIoUringBufferRing.IoUringBufferRingConfig.Builder IoUringBufferRingExhaustedEvent Event that is fired when a read failed because the buffer ring was exhausted for now.IoUringChannelConfig IoUringChannelOption<T> IoUringDatagramChannel IoUringDatagramChannelConfig IoUringDomainSocketChannel DomainSocketChannelimplementation that uses linux io_uringIoUringDomainSocketChannelConfig IoUringFileRegion IoUringFixedBufferRingAllocator IoUringBufferRingAllocatorimplementation which uses a fixed size for the buffers that are returned byAbstractIoUringBufferRingAllocator.allocate().IoUringIoEvent IoEventthat will be produced as an result of aIoUringIoOps.IoUringIoHandler IoHandlerwhich is implemented in terms of the Linux-specificio_uringAPI.IoUringIoHandlerConfig Configuration class for anIoUringIoHandler, managing the settings for aRingBufferand its io_uring file descriptor.IoUringIoOps IoUringRecvByteAllocatorHandle IoUringServerDomainSocketChannel IoUringServerSocketChannel IoUringServerSocketChannelConfig IoUringSocketChannel IoUringSocketChannelConfig IoUringStreamChannelConfig IoUringTcpInfo struct tcp_info { __u8 tcpi_state; __u8 tcpi_ca_state; __u8 tcpi_retransmits; __u8 tcpi_probes; __u8 tcpi_backoff; __u8 tcpi_options; __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; __u32 tcpi_rto; __u32 tcpi_ato; __u32 tcpi_snd_mss; __u32 tcpi_rcv_mss; __u32 tcpi_unacked; __u32 tcpi_sacked; __u32 tcpi_lost; __u32 tcpi_retrans; __u32 tcpi_fackets; __u32 tcpi_last_data_sent; __u32 tcpi_last_ack_sent; __u32 tcpi_last_data_recv; __u32 tcpi_last_ack_recv; __u32 tcpi_pmtu; __u32 tcpi_rcv_ssthresh; __u32 tcpi_rtt; __u32 tcpi_rttvar; __u32 tcpi_snd_ssthresh; __u32 tcpi_snd_cwnd; __u32 tcpi_advmss; __u32 tcpi_reordering; __u32 tcpi_rcv_rtt; __u32 tcpi_rcv_space; __u32 tcpi_total_retrans; };Iov struct iovec { void *iov_base; // Starting address size_t iov_len; // Number of bytes to transfer };IovArrayReferenceCollector Fills theIoUringIoHandler'sIovArrayfrom flushed outbound messages and records theByteBufbehind each entry it added, so the caller can copy those references into aWriteOperationslot once the SQE is built.LinuxSocket A socket which provides access Linux native methods.MsgHdr struct msghdr { void *msg_name; // optional address socklen_t msg_namelen; // size of address struct iovec*msg_iov; // scatter/gather array size_t msg_iovlen; // # elements in msg_iov void* msg_control; // ancillary data, see below size_t msg_controllen; // ancillary data buffer len int msg_flags; // flags on received message };MsgHdrMemory MsgHdrMemoryArray Native Native.IoUringProbe Native.IoUringProbeOp NativeStaticallyReferencedJniMethods This class is necessary to break the following cyclic dependency: JNI_OnLoad JNI Calls FindClass because RegisterNatives (used to register JNI methods) requires a class FindClass loads the class, but static members variables of that class attempt to call a JNI method which has not yet been registered. java.lang.UnsatisfiedLinkError is thrown because native method has not yet been registered. Static members which call JNI methods must not be declared in this class!PendingOpMap RingBuffer SockaddrIn SubmissionQueue UserData WriteOperation A slot tracking the references a submitted SQE handed to the kernel.WriteOperationTracker Owns every in-flight write operation a channel tracks, across the four namespaces a channel can have live at once: a pooled slot array (ids this class hands out itself), an overflow map (a long-id fallback once the pooled range is exhausted), a foreign slot array (ids an allocator this class does not own hands the caller, such as aMsgHdrMemoryArrayindex), and a single slot for the one non-zero-copy write a stream channel can have outstanding at a time.