addShutdownHook() — netty Function Reference
Architecture documentation for the addShutdownHook() function in SingleThreadEventExecutor.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 854af53c_2ead_d46e_88b1_d06b416dc73d["addShutdownHook()"] c9189467_acbc_07ea_3a8c_fecfe22ec122["SingleThreadEventExecutor"] 854af53c_2ead_d46e_88b1_d06b416dc73d -->|defined in| c9189467_acbc_07ea_3a8c_fecfe22ec122 957fd634_92d8_ad7a_8d3f_c6d9e5d7ee2a["inEventLoop()"] 854af53c_2ead_d46e_88b1_d06b416dc73d -->|calls| 957fd634_92d8_ad7a_8d3f_c6d9e5d7ee2a ced7700b_627f_0ab1_ff34_9e3824dfeea8["execute()"] 854af53c_2ead_d46e_88b1_d06b416dc73d -->|calls| ced7700b_627f_0ab1_ff34_9e3824dfeea8 8846f570_8032_89c9_e9e7_f552f8890802["Runnable()"] 854af53c_2ead_d46e_88b1_d06b416dc73d -->|calls| 8846f570_8032_89c9_e9e7_f552f8890802 4b4e2a57_ff72_0b7e_a075_ec9d6f860ef0["run()"] 854af53c_2ead_d46e_88b1_d06b416dc73d -->|calls| 4b4e2a57_ff72_0b7e_a075_ec9d6f860ef0 style 854af53c_2ead_d46e_88b1_d06b416dc73d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java lines 720–731
public void addShutdownHook(final Runnable task) {
if (inEventLoop()) {
shutdownHooks.add(task);
} else {
execute(new Runnable() {
@Override
public void run() {
shutdownHooks.add(task);
}
});
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does addShutdownHook() do?
addShutdownHook() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java.
Where is addShutdownHook() defined?
addShutdownHook() is defined in common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java at line 720.
What does addShutdownHook() call?
addShutdownHook() calls 4 function(s): Runnable, execute, inEventLoop, run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free