IoUringBufferRingAllocator Type — netty Architecture
Architecture documentation for the IoUringBufferRingAllocator type/interface in IoUringBufferRingAllocator.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 7ad15538_7576_dfc9_1f84_c35994908dba["IoUringBufferRingAllocator"] 42c3f969_e1ab_94d5_9fb1_fc86b0a282d7["IoUringBufferRingAllocator.java"] 7ad15538_7576_dfc9_1f84_c35994908dba -->|defined in| 42c3f969_e1ab_94d5_9fb1_fc86b0a282d7 style 7ad15538_7576_dfc9_1f84_c35994908dba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringBufferRingAllocator.java lines 25–52
public interface IoUringBufferRingAllocator {
/**
* Creates a new receive buffer to use by the buffer ring. The returned {@link ByteBuf} must be direct.
*/
ByteBuf allocate();
/**
* Set the bytes that have been read for the last read operation that was full-filled out of the buffer ring.
*
* @param attempted the attempted bytes to read.
* @param actual the number of bytes that could be read.
*/
void lastBytesRead(int attempted, int actual);
/**
* Fill in {@code num} of {@link ByteBuf}s.
* <strong>Important:</strong> The {@link Consumer} MUST not escape this method.
*
* @param consumer the {@link Consumer} that will consume the buffers.
* @param num the number of buffers that are passed to {@link Consumer#accept(Object)}.
*/
default void allocateBatch(Consumer<ByteBuf> consumer, int num) {
for (int i = 0; i < num; i++) {
consumer.accept(allocate());
}
}
}
Defined In
Source
Frequently Asked Questions
What is the IoUringBufferRingAllocator type?
IoUringBufferRingAllocator is a type/interface in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringBufferRingAllocator.java.
Where is IoUringBufferRingAllocator defined?
IoUringBufferRingAllocator is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringBufferRingAllocator.java at line 25.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free