public class SilentFileWatcher extends Object implements FileWatcher
SILENT_WATCHER| Constructor and Description |
|---|
SilentFileWatcher() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFileWatchEventListener(FileWatchEventListener listener)
Register listener to receive updates about registered resources.
|
void |
close() |
void |
removeFileWatchEventListener(FileWatchEventListener listener)
Remove listener from a list of updates receivers.
|
void |
startWatching()
Start monitoring of registered directories.
|
void |
stopWatching()
Stop monitoring of registered directories
|
WatchedResource |
watch(File file)
Register provided directory in list of resources that we would like to watch and receive status modification
updates
|
public WatchedResource watch(File file) throws IOException
FileWatcherwatch in interface FileWatcherfile - directory to be monitored for updatesIOExceptionpublic void addFileWatchEventListener(FileWatchEventListener listener)
FileWatcheraddFileWatchEventListener in interface FileWatcherlistener - listener to registerpublic void removeFileWatchEventListener(FileWatchEventListener listener)
FileWatcherremoveFileWatchEventListener in interface FileWatcherlistener - listener to removepublic void stopWatching()
FileWatcherstopWatching in interface FileWatcherpublic void startWatching()
throws InterruptedException
FileWatcherFileWatcher.stopWatching().startWatching in interface FileWatcherInterruptedException - when interrupted while waiting for update notification to comepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.