Home / Function/ total() — netty Function Reference

total() — netty Function Reference

Architecture documentation for the total() function in ChannelOutboundBuffer.java from the netty codebase.

Function java Buffer Search called by 1

Entity Profile

Dependency Diagram

graph TD
  eebc2e03_942d_1252_0ab7_824d613db683["total()"]
  509b1bc5_7cdc_9ee4_03d9_31eb2203d807["ChannelOutboundBuffer"]
  eebc2e03_942d_1252_0ab7_824d613db683 -->|defined in| 509b1bc5_7cdc_9ee4_03d9_31eb2203d807
  88f982fc_caf9_0319_b65e_2fb365723618["addMessage()"]
  88f982fc_caf9_0319_b65e_2fb365723618 -->|calls| eebc2e03_942d_1252_0ab7_824d613db683
  style eebc2e03_942d_1252_0ab7_824d613db683 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java lines 210–221

    private static long total(Object msg) {
        if (msg instanceof ByteBuf) {
            return ((ByteBuf) msg).readableBytes();
        }
        if (msg instanceof FileRegion) {
            return ((FileRegion) msg).count();
        }
        if (msg instanceof ByteBufHolder) {
            return ((ByteBufHolder) msg).content().readableBytes();
        }
        return -1;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does total() do?
total() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java.
Where is total() defined?
total() is defined in transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java at line 210.
What calls total()?
total() is called by 1 function(s): addMessage.

Analyze Your Own Codebase

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

Try Supermodel Free