public class FileNodeListener extends NodeListener
| Constructor and Description |
|---|
FileNodeListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Close the ScheduledExecutorService.
|
String |
getFile() |
int |
getIntervalSeconds() |
void |
init()
Start a Scheduler to check the specified file.
|
List<NodeEvent> |
refresh()
Load the properties file and diff with the stored Properties.
|
void |
setFile(String file) |
void |
setIntervalSeconds(int intervalSeconds) |
getLastUpdateTime, getObserver, getPrefix, getProperties, setLastUpdateTime, setObserver, setPrefix, setProperties, update, updateaddObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObserverspublic void init()
init in class NodeListenersetIntervalSeconds(int),
NodeListener.update()public List<NodeEvent> refresh()
refresh in class NodeListenerpublic void destroy()
destroy in class NodeListenerpublic int getIntervalSeconds()
public void setIntervalSeconds(int intervalSeconds)
public String getFile()
public void setFile(String file)
Copyright © 2013–2021 Alibaba Group. All rights reserved.