public class ShutdownHook extends Thread
WorkerProcessor.shutdown()方法,只要尽量保证把这个关闭信息告诉server,就够了,
其余在WorkerProcessor.shutdown()中做的进程内的清理动作,即使没能做成功,影响的也是进程内的事情,手工KILL -9就好了Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| 构造器和说明 |
|---|
ShutdownHook() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldCopyright © 2016. All rights reserved.