public class WatchManager extends AbstractLifeCycle
LifeCycle.State
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER
Constructor and Description |
---|
WatchManager(ConfigurationScheduler scheduler) |
Modifier and Type | Method and Description |
---|---|
int |
getIntervalSeconds() |
Map<File,FileWatcher> |
getWatchers() |
void |
setIntervalSeconds(int intervalSeconds) |
void |
start() |
boolean |
stop(long timeout,
TimeUnit timeUnit)
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current
thread is interrupted, whichever happens first.
|
String |
toString() |
void |
watchFile(File file,
FileWatcher watcher) |
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stop
public WatchManager(ConfigurationScheduler scheduler)
public void setIntervalSeconds(int intervalSeconds)
public int getIntervalSeconds()
public void start()
start
in interface LifeCycle
start
in class AbstractLifeCycle
public boolean stop(long timeout, TimeUnit timeUnit)
LifeCycle2
stop
in interface LifeCycle2
stop
in class AbstractLifeCycle
timeout
- the maximum time to waittimeUnit
- the time unit of the timeout argumentpublic void watchFile(File file, FileWatcher watcher)
public Map<File,FileWatcher> getWatchers()
Copyright © 1999-2018 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.