Package io.netty.channel.uring
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.
-
ClassDescriptionBase class for
IoUringBufferRingAllocatorimplementations which support large allocations.AWritableByteChannelbacked by aByteBuf.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[]; };Completion queue implementation for io_uring.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.Allocator that is responsible to allocate buffers for a buffer ring.Configuration class for anIoUringBufferRing.Event that is fired when a read failed because the buffer ring was exhausted for now.DomainSocketChannelimplementation that uses linux io_uringIoUringBufferRingAllocatorimplementation which uses a fixed size for the buffers that are returned byAbstractIoUringBufferRingAllocator.allocate().IoEventthat will be produced as an result of aIoUringIoOps.IoHandleimplementation for io_uring.IoHandlerwhich is implemented in terms of the Linux-specificio_uringAPI.Configuration class for anIoUringIoHandler, managing the settings for aRingBufferand its io_uring file descriptor.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; };struct iovec { void *iov_base; // Starting address size_t iov_len; // Number of bytes to transfer };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.A socket which provides access Linux native methods.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 };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!A slot tracking the references a submitted SQE handed to the kernel.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.