Home / File/ IoUringBufferRingConfig.java — netty Source File

IoUringBufferRingConfig.java — netty Source File

Architecture documentation for IoUringBufferRingConfig.java, a java file in the netty codebase.

File java Buffer Search 2 classes

Entity Profile

Relationship Graph

Source Code

/*
 * Copyright 2025 The Netty Project
 *
 * The Netty Project licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package io.netty.channel.uring;

import io.netty.buffer.ByteBuf;
import io.netty.util.internal.MathUtil;
import io.netty.util.internal.ObjectUtil;

import java.util.Objects;

/**
 * Configuration class for an {@link IoUringBufferRing}.
 * It will configure the buffer ring size, buffer group id and the chunk size.
 */
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.
// ... (215 more lines)

Domain

Subdomains

Frequently Asked Questions

What does IoUringBufferRingConfig.java do?
IoUringBufferRingConfig.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Search subdomain.
Where is IoUringBufferRingConfig.java in the architecture?
IoUringBufferRingConfig.java is located at transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringBufferRingConfig.java (domain: Buffer, subdomain: Search, directory: transport-classes-io_uring/src/main/java/io/netty/channel/uring).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free