public interface FileWatcher extends Closeable
watch(File) method call and add by adding listner to be able to receive
status updates.WatchService| Modifier and Type | Field and Description |
|---|---|
static FileWatcher |
SILENT_WATCHER |
| Modifier and Type | Method and Description |
|---|---|
void |
addFileWatchEventListener(FileWatchEventListener listener)
Register listener to receive updates about registered resources.
|
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
|
static final FileWatcher SILENT_WATCHER
WatchedResource watch(File file) throws IOException
file - directory to be monitored for updatesIOExceptionvoid addFileWatchEventListener(FileWatchEventListener listener)
listener - listener to registervoid removeFileWatchEventListener(FileWatchEventListener listener)
listener - listener to removevoid stopWatching()
void startWatching()
throws InterruptedException
stopWatching().InterruptedException - when interrupted while waiting for update notification to comeCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.