public abstract class AbstractWatcher extends Object implements Watcher
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractWatcher.ReconfigurationRunnable
Helper class for triggering a reconfiguration in a background thread.
|
CATEGORY, ELEMENT_TYPE| Constructor and Description |
|---|
AbstractWatcher(Configuration configuration,
Reconfigurable reconfigurable,
List<ConfigurationListener> configurationListeners) |
| Modifier and Type | Method and Description |
|---|---|
Configuration |
getConfiguration() |
abstract long |
getLastModified()
Returns the time the source was last modified or 0 if it is not available.
|
List<ConfigurationListener> |
getListeners()
Returns the list of listeners for this configuration.
|
Source |
getSource()
Returns the Source being monitored.
|
abstract boolean |
isModified()
Periodically called to determine if the configuration has been modified.
|
void |
modified()
Called when the configuration has been modified.
|
void |
watching(Source source)
Called when the Watcher is registered.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewWatcherpublic AbstractWatcher(Configuration configuration, Reconfigurable reconfigurable, List<ConfigurationListener> configurationListeners)
public List<ConfigurationListener> getListeners()
WatchergetListeners in interface Watcherpublic void modified()
Watcherpublic Configuration getConfiguration()
public abstract long getLastModified()
WatchergetLastModified in interface Watcherpublic abstract boolean isModified()
WatcherisModified in interface Watcherpublic void watching(Source source)
WatcherCopyright © 1999-2021 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.