Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
In FiltersrvStartup.class and NamesrvStartup.class, exist the exact same code about add jvm shutdown hook, and execute somthing on shutting down.
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
private volatile boolean hasShutdown = false;
private AtomicInteger shutdownTimes = new AtomicInteger(0);
@Override
public void run() {
synchronized (this) {
log.info("shutdown hook was invoked, " + this.shutdownTimes.incrementAndGet());
if (!this.hasShutdown)
}
}
}, "ShutdownHook"));
Attachments
Issue Links
- links to