IoUringBufferRingConfig Class — netty Architecture
Architecture documentation for the IoUringBufferRingConfig class in IoUringBufferRingConfig.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 75b83361_e279_9664_b85a_9c520dfa23da["IoUringBufferRingConfig"] 1e575dd6_a424_21de_d460_00d77762f04c["IoUringBufferRingConfig.java"] 75b83361_e279_9664_b85a_9c520dfa23da -->|defined in| 1e575dd6_a424_21de_d460_00d77762f04c b4c01d87_2346_9d2d_94fd_96bc37f2cbb0["IoUringBufferRingConfig()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| b4c01d87_2346_9d2d_94fd_96bc37f2cbb0 dcc6cfe4_816f_a02f_62b7_e0b7bca54861["bufferGroupId()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| dcc6cfe4_816f_a02f_62b7_e0b7bca54861 1756f95c_418d_6de6_4aa4_f4e9a8ab1efb["bufferRingSize()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| 1756f95c_418d_6de6_4aa4_f4e9a8ab1efb 31537018_2e78_4db5_0431_79be9c9e02e2["batchSize()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| 31537018_2e78_4db5_0431_79be9c9e02e2 64a2c103_039e_5e9e_8e49_3f0e5e59ab61["maxUnreleasedBuffers()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| 64a2c103_039e_5e9e_8e49_3f0e5e59ab61 d3397765_0601_57dd_aa41_8acd0cc47a10["IoUringBufferRingAllocator()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| d3397765_0601_57dd_aa41_8acd0cc47a10 aeaba979_2894_e9df_fb1c_48d4077976b1["isBatchAllocation()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| aeaba979_2894_e9df_fb1c_48d4077976b1 21cc277f_a01f_6c14_1001_95de115ffda2["isIncremental()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| 21cc277f_a01f_6c14_1001_95de115ffda2 5d809c99_8e19_9ffb_d6ec_000f95dc2475["checkBufferRingSize()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| 5d809c99_8e19_9ffb_d6ec_000f95dc2475 9093e394_1231_231a_99ef_dc7a4546f930["equals()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| 9093e394_1231_231a_99ef_dc7a4546f930 6d32ed6c_5343_24bb_ee00_5e71d3041339["hashCode()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| 6d32ed6c_5343_24bb_ee00_5e71d3041339 07ed7bc8_2f5b_7cc4_c8f2_bd59879195fb["Builder()"] 75b83361_e279_9664_b85a_9c520dfa23da -->|method| 07ed7bc8_2f5b_7cc4_c8f2_bd59879195fb
Relationship Graph
Source Code
transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringBufferRingConfig.java lines 28–274
public final class IoUringBufferRingConfig {
private final short bgId;
private final short bufferRingSize;
private final int batchSize;
private final int maxUnreleasedBuffers;
private final boolean incremental;
private final IoUringBufferRingAllocator allocator;
private final boolean batchAllocation;
/**
* Create a new configuration.
*
* @param bgId the buffer group id to use (must be non-negative).
* @param bufferRingSize the size of the ring
* @param maxUnreleasedBuffers this parameter is ignored by the buffer ring.
* @param allocator the {@link IoUringBufferRingAllocator} to use to allocate
* {@link io.netty.buffer.ByteBuf}s.
* @deprecated use {@link Builder}.
*/
@Deprecated
public IoUringBufferRingConfig(short bgId, short bufferRingSize, int maxUnreleasedBuffers,
IoUringBufferRingAllocator allocator) {
this(bgId, bufferRingSize, bufferRingSize / 2, maxUnreleasedBuffers,
IoUring.isRegisterBufferRingIncSupported(), allocator);
}
/**
* Create a new configuration.
*
* @param bgId the buffer group id to use (must be non-negative).
* @param bufferRingSize the size of the ring
* @param batchSize the size of the batch on how many buffers are added everytime we need to expand the
* buffer ring.
* @param maxUnreleasedBuffers this parameter is ignored by the buffer ring.
* @param incremental {@code true} if the buffer ring is using incremental buffer consumption.
* @param allocator the {@link IoUringBufferRingAllocator} to use to allocate
* {@link io.netty.buffer.ByteBuf}s.
* @deprecated use {@link Builder}.
*/
@Deprecated
public IoUringBufferRingConfig(short bgId, short bufferRingSize, int batchSize, int maxUnreleasedBuffers,
boolean incremental, IoUringBufferRingAllocator allocator) {
this(bgId, bufferRingSize, batchSize, maxUnreleasedBuffers, incremental, allocator, false);
}
private IoUringBufferRingConfig(short bgId, short bufferRingSize, int batchSize, int maxUnreleasedBuffers,
boolean incremental, IoUringBufferRingAllocator allocator, boolean batchAllocation) {
this.bgId = (short) ObjectUtil.checkPositiveOrZero(bgId, "bgId");
this.bufferRingSize = checkBufferRingSize(bufferRingSize);
this.batchSize = MathUtil.findNextPositivePowerOfTwo(
ObjectUtil.checkInRange(batchSize, 1, bufferRingSize, "batchSize"));
this.maxUnreleasedBuffers = ObjectUtil.checkInRange(
maxUnreleasedBuffers, bufferRingSize, Integer.MAX_VALUE, "maxUnreleasedBuffers");
if (incremental && !IoUring.isRegisterBufferRingIncSupported()) {
throw new IllegalArgumentException("Incremental buffer ring is not supported");
}
this.incremental = incremental;
this.allocator = ObjectUtil.checkNotNull(allocator, "allocator");
this.batchAllocation = batchAllocation;
}
/**
* Returns the buffer group id to use.
*
* @return the buffer group id to use.
*/
public short bufferGroupId() {
return bgId;
}
/**
* Returns the size of the ring.
*
* @return the size of the ring.
*/
public short bufferRingSize() {
return bufferRingSize;
}
/**
* Returns the size of the batch on how many buffers are added everytime we need to expand the buffer ring.
Defined In
Source
Frequently Asked Questions
What is the IoUringBufferRingConfig class?
IoUringBufferRingConfig is a class in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringBufferRingConfig.java.
Where is IoUringBufferRingConfig defined?
IoUringBufferRingConfig is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringBufferRingConfig.java at line 28.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free