Interface DirectoryMonitorManager
Deprecated.
Manages directory monitoring by allowing adding and removal of DirectoryMonitors.
Once a monitor has been added via this manager, it will monitor the directory either via listening to remote mutation
events or via polling the remote directory periodically.
One directory can have at most one monitor.
Implementations are required to be thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMonitor(RemoteDirectory directory) Deprecated.Adds a monitor to a particular directory.booleanhasMonitor(long directoryID) Deprecated.Determines whether a directory is currently being monitored.booleanremoveMonitor(long directoryID) Deprecated.Removes a monitor from a monitored directory.
-
Method Details
-
addMonitor
void addMonitor(RemoteDirectory directory) throws DirectoryInstantiationException, DirectoryMonitorCreationException, DirectoryMonitorRegistrationException, DirectoryMonitorAlreadyRegisteredException Deprecated.Adds a monitor to a particular directory.- Parameters:
directory- directory to monitor.- Throws:
DirectoryInstantiationException- if the raw remote directory cannot be instantiated.DirectoryMonitorCreationException- if there was an error creating a monitor for the directory.DirectoryMonitorRegistrationException- if there was an error registering the monitor.DirectoryMonitorAlreadyRegisteredException- hasMonitor(directoryID) returns true.
-
removeMonitor
Deprecated.Removes a monitor from a monitored directory.- Parameters:
directoryID- directory ID.- Returns:
trueif a monitor was removed.- Throws:
DirectoryMonitorUnregistrationException- if there was an error removing the monitor.
-
hasMonitor
boolean hasMonitor(long directoryID) Deprecated.Determines whether a directory is currently being monitored.- Parameters:
directoryID- directory ID.- Returns:
trueif an only if the directory is being monitored.
-
SynchronisableDirectoryget their monitors added, updated and removed automatically.