Thread.State, Thread.UncaughtExceptionHandler| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
running |
protected UndertowServer |
undertowServer |
protected int |
watchingInterval |
protected List<Path> |
watchingPaths |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| 构造器和说明 |
|---|
HotSwapWatcher(UndertowServer undertowServer) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
addShutdownHook(WatchService watcher)
添加关闭钩子在 JVM 退出时关闭 WatchService
注意:addShutdownHook 方式添加的回调在 kill -9 pid 强制退出 JVM 时不会被调用
kill 不带参数 -9 时才回调
|
protected List<Path> |
buildWatchingPaths() |
protected void |
doRun() |
void |
exit() |
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, yieldprotected UndertowServer undertowServer
protected int watchingInterval
protected volatile boolean running
public HotSwapWatcher(UndertowServer undertowServer)
protected void doRun()
throws IOException
IOExceptionprotected void addShutdownHook(WatchService watcher)
public void exit()
Copyright © 2019. All rights reserved.