Home / Function/ lastBytesRead() — netty Function Reference

lastBytesRead() — netty Function Reference

Architecture documentation for the lastBytesRead() function in IoUringAdaptiveBufferRingAllocator.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4f70a3e6_0cbb_f353_69ce_9af22cb455f4["lastBytesRead()"]
  ea549e35_3c5b_37b8_5629_411ca2ddf734["IoUringAdaptiveBufferRingAllocator"]
  4f70a3e6_0cbb_f353_69ce_9af22cb455f4 -->|defined in| ea549e35_3c5b_37b8_5629_411ca2ddf734
  style 4f70a3e6_0cbb_f353_69ce_9af22cb455f4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringAdaptiveBufferRingAllocator.java lines 80–89

    @Override
    public void lastBytesRead(int attempted, int actual) {
        // If we read as much as we asked for we should check if we need to ramp up the size of our next guess.
        // This helps adjust more quickly when large amounts of data is pending and can avoid going back to
        // the selector to check for more data. Going back to the selector can add significant latency for large
        // data transfers.
        if (attempted == actual) {
            calculator.record(actual);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does lastBytesRead() do?
lastBytesRead() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringAdaptiveBufferRingAllocator.java.
Where is lastBytesRead() defined?
lastBytesRead() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringAdaptiveBufferRingAllocator.java at line 80.

Analyze Your Own Codebase

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

Try Supermodel Free