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, wait
newWatcher
public AbstractWatcher(Configuration configuration, Reconfigurable reconfigurable, List<ConfigurationListener> configurationListeners)
public List<ConfigurationListener> getListeners()
Watcher
getListeners
in interface Watcher
public void modified()
Watcher
public Configuration getConfiguration()
public abstract long getLastModified()
Watcher
getLastModified
in interface Watcher
public abstract boolean isModified()
Watcher
isModified
in interface Watcher
public void watching(Source source)
Watcher
Copyright © 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.