Home / Function/ checkWaitReadTime() — netty Function Reference

checkWaitReadTime() — netty Function Reference

Architecture documentation for the checkWaitReadTime() function in GlobalChannelTrafficShapingHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7e801b53_0b20_7901_ec31_c683f033fbe2["checkWaitReadTime()"]
  70857fc2_a134_e299_7b48_1738d53c0016["GlobalChannelTrafficShapingHandler"]
  7e801b53_0b20_7901_ec31_c683f033fbe2 -->|defined in| 70857fc2_a134_e299_7b48_1738d53c0016
  ae77ebe1_84b2_b0c0_804c_46784f484fe4["channelRead()"]
  ae77ebe1_84b2_b0c0_804c_46784f484fe4 -->|calls| 7e801b53_0b20_7901_ec31_c683f033fbe2
  style 7e801b53_0b20_7901_ec31_c683f033fbe2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/traffic/GlobalChannelTrafficShapingHandler.java lines 576–586

    @Override
    protected long checkWaitReadTime(final ChannelHandlerContext ctx, long wait, final long now) {
        Integer key = ctx.channel().hashCode();
        PerChannel perChannel = channelQueues.get(key);
        if (perChannel != null) {
            if (wait > maxTime && now + wait - perChannel.lastReadTimestamp > maxTime) {
                wait = maxTime;
            }
        }
        return wait;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does checkWaitReadTime() do?
checkWaitReadTime() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/traffic/GlobalChannelTrafficShapingHandler.java.
Where is checkWaitReadTime() defined?
checkWaitReadTime() is defined in handler/src/main/java/io/netty/handler/traffic/GlobalChannelTrafficShapingHandler.java at line 576.
What calls checkWaitReadTime()?
checkWaitReadTime() is called by 1 function(s): channelRead.

Analyze Your Own Codebase

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

Try Supermodel Free