addData() — netty Function Reference
Architecture documentation for the addData() function in NoPriorityByteDistributionBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a7eb557c_1242_3959_11ef_d3cf6e5dcbac["addData()"] f30bf97b_8baf_7546_403d_6c90acdabe12["NoPriorityByteDistributionBenchmark"] a7eb557c_1242_3959_11ef_d3cf6e5dcbac -->|defined in| f30bf97b_8baf_7546_403d_6c90acdabe12 c3443fcf_5e0f_eff9_15eb_9c1d317d4307["setupTrial()"] c3443fcf_5e0f_eff9_15eb_9c1d317d4307 -->|calls| a7eb557c_1242_3959_11ef_d3cf6e5dcbac 7cca7619_d1f7_9ecd_7b9b_6fa06fbe56c9["refreshData()"] 7cca7619_d1f7_9ecd_7b9b_6fa06fbe56c9 -->|calls| a7eb557c_1242_3959_11ef_d3cf6e5dcbac d3c15c2b_89df_c6f8_2627_eddb52f353a8["write()"] a7eb557c_1242_3959_11ef_d3cf6e5dcbac -->|calls| d3c15c2b_89df_c6f8_2627_eddb52f353a8 style a7eb557c_1242_3959_11ef_d3cf6e5dcbac fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java lines 181–219
private void addData(Http2Stream stream, final int dataSize) {
controller.addFlowControlled(stream, new Http2RemoteFlowController.FlowControlled() {
private int size = dataSize;
@Override
public int size() {
return size;
}
@Override
public void error(ChannelHandlerContext ctx, Throwable cause) {
cause.printStackTrace();
}
@Override
public void writeComplete() {
// Don't care.
}
@Override
public void write(ChannelHandlerContext ctx, int allowedBytes) {
size -= allowedBytes;
}
@Override
public boolean merge(ChannelHandlerContext ctx,
Http2RemoteFlowController.FlowControlled next) {
int nextSize = next.size();
if (Integer.MAX_VALUE - nextSize < size) {
// Disallow merge to avoid integer overflow.
return false;
}
// Merge.
size += nextSize;
return true;
}
});
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does addData() do?
addData() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java.
Where is addData() defined?
addData() is defined in microbench/src/main/java/io/netty/microbench/http2/NoPriorityByteDistributionBenchmark.java at line 181.
What does addData() call?
addData() calls 1 function(s): write.
What calls addData()?
addData() is called by 2 function(s): refreshData, setupTrial.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free