Home / Function/ record() — netty Function Reference

record() — netty Function Reference

Architecture documentation for the record() function in AdaptiveCalculator.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d410ae4c_f791_89af_3305_5d66c5905f9c["record()"]
  2f0e419b_c7aa_e7dc_bae6_34e16344d97c["AdaptiveCalculator"]
  d410ae4c_f791_89af_3305_5d66c5905f9c -->|defined in| 2f0e419b_c7aa_e7dc_bae6_34e16344d97c
  style d410ae4c_f791_89af_3305_5d66c5905f9c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/internal/AdaptiveCalculator.java lines 117–131

    public void record(int size) {
        if (size <= SIZE_TABLE[max(0, index - INDEX_DECREMENT)]) {
            if (decreaseNow) {
                index = max(index - INDEX_DECREMENT, minIndex);
                nextSize = max(SIZE_TABLE[index], minCapacity);
                decreaseNow = false;
            } else {
                decreaseNow = true;
            }
        } else if (size >= nextSize) {
            index = min(index + INDEX_INCREMENT, maxIndex);
            nextSize = min(SIZE_TABLE[index], maxCapacity);
            decreaseNow = false;
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does record() do?
record() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/AdaptiveCalculator.java.
Where is record() defined?
record() is defined in common/src/main/java/io/netty/util/internal/AdaptiveCalculator.java at line 117.

Analyze Your Own Codebase

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

Try Supermodel Free