cancel() — netty Function Reference
Architecture documentation for the cancel() function in DefaultHttp2RemoteFlowController.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8e51738b_ec39_64b4_209a_eaf98c44fe11["cancel()"] b2e83a60_2b9a_b7db_749c_dd2e3fd31ba6["FlowState"] 8e51738b_ec39_64b4_209a_eaf98c44fe11 -->|defined in| b2e83a60_2b9a_b7db_749c_dd2e3fd31ba6 580fd994_c3d5_2237_e59c_286ec9432b45["DefaultHttp2RemoteFlowController()"] 580fd994_c3d5_2237_e59c_286ec9432b45 -->|calls| 8e51738b_ec39_64b4_209a_eaf98c44fe11 8ff90321_aa45_54f3_2c52_ad6b0500f375["writeAllocatedBytes()"] 8ff90321_aa45_54f3_2c52_ad6b0500f375 -->|calls| 8e51738b_ec39_64b4_209a_eaf98c44fe11 a110deae_8883_0c41_048d_eacdf41def99["writeError()"] 8e51738b_ec39_64b4_209a_eaf98c44fe11 -->|calls| a110deae_8883_0c41_048d_eacdf41def99 c7b70004_1a90_09f1_9939_cc705b244d1d["stateCancelled()"] 8e51738b_ec39_64b4_209a_eaf98c44fe11 -->|calls| c7b70004_1a90_09f1_9939_cc705b244d1d style 8e51738b_ec39_64b4_209a_eaf98c44fe11 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowController.java lines 469–490
void cancel(Http2Error error, Throwable cause) {
cancelled = true;
// Ensure that the queue can't be modified while we are writing.
if (writing) {
return;
}
FlowControlled frame = pendingWriteQueue.poll();
if (frame != null) {
// Only create exception once and reuse to reduce overhead of filling in the stacktrace.
final Http2Exception exception = streamError(stream.id(), error, cause,
"Stream closed before write could take place");
do {
writeError(frame, exception);
frame = pendingWriteQueue.poll();
} while (frame != null);
}
streamByteDistributor.updateStreamableBytes(this);
monitor.stateCancelled(this);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does cancel() do?
cancel() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowController.java.
Where is cancel() defined?
cancel() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowController.java at line 469.
What does cancel() call?
cancel() calls 2 function(s): stateCancelled, writeError.
What calls cancel()?
cancel() is called by 2 function(s): DefaultHttp2RemoteFlowController, writeAllocatedBytes.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free