cancel() — netty Function Reference
Architecture documentation for the cancel() function in HashedWheelTimer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c0829aeb_3b87_2da4_8623_2515c85ff6b5["cancel()"] 8bee3e2e_d827_0301_76b0_12fc08d40d2b["HashedWheelTimeout"] c0829aeb_3b87_2da4_8623_2515c85ff6b5 -->|defined in| 8bee3e2e_d827_0301_76b0_12fc08d40d2b bd4bf731_7996_ea82_2640_1afb233683ee["stop()"] bd4bf731_7996_ea82_2640_1afb233683ee -->|calls| c0829aeb_3b87_2da4_8623_2515c85ff6b5 5d04c7cd_738b_2713_de7a_1e3dbddb9ae8["compareAndSetState()"] c0829aeb_3b87_2da4_8623_2515c85ff6b5 -->|calls| 5d04c7cd_738b_2713_de7a_1e3dbddb9ae8 style c0829aeb_3b87_2da4_8623_2515c85ff6b5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/HashedWheelTimer.java lines 655–666
@Override
public boolean cancel() {
// only update the state it will be removed from HashedWheelBucket on next tick.
if (!compareAndSetState(ST_INIT, ST_CANCELLED)) {
return false;
}
// If a task should be canceled we put this to another queue which will be processed on each tick.
// So this means that we will have a GC latency of max. 1 tick duration which is good enough. This way
// we can make again use of our MpscLinkedQueue and so minimize the locking / overhead as much as possible.
timer.cancelledTimeouts.add(this);
return true;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does cancel() do?
cancel() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/HashedWheelTimer.java.
Where is cancel() defined?
cancel() is defined in common/src/main/java/io/netty/util/HashedWheelTimer.java at line 655.
What does cancel() call?
cancel() calls 1 function(s): compareAndSetState.
What calls cancel()?
cancel() is called by 1 function(s): stop.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free