public abstract class FileWatchdog extends Thread
doOnChange()
method.Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_DELAY
The default delay between every file modification check, set to 60 seconds.
|
protected long |
delay
The delay to observe between every check.
|
protected String |
filename
The name of the file to observe for changes.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier | Constructor and Description |
---|---|
protected |
FileWatchdog(String fileName) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAndConfigure() |
protected abstract void |
doOnChange() |
void |
run() |
void |
setDelay(long delayMillis)
Sets the delay in milliseconds to observe between each check of the file changes.
|
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, yield
public static final long DEFAULT_DELAY
protected String filename
protected long delay
DEFAULT_DELAY
.protected FileWatchdog(String fileName)
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.