Package thredds.server.catalog.tracker
Class CatalogWatcher
- java.lang.Object
-
- thredds.server.catalog.tracker.CatalogWatcher
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CatalogWatcher extends Object implements Closeable
Put a watch on directories for when catalogs change. not used yet- Since:
- 6/9/2015
-
-
Constructor Summary
Constructors Constructor Description CatalogWatcher(DatasetTracker tracker, boolean enable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidprocessEvents()Process all events for keys queued to the watchervoidregister(Path dir)Register the given directory with the WatchServicevoidregisterAll(Path start)Register the given directory, and all its sub-directories, with the WatchService.
-
-
-
Constructor Detail
-
CatalogWatcher
public CatalogWatcher(DatasetTracker tracker, boolean enable) throws IOException
- Throws:
IOException
-
-
Method Detail
-
register
public void register(Path dir) throws IOException
Register the given directory with the WatchService- Throws:
IOException
-
registerAll
public void registerAll(Path start) throws IOException
Register the given directory, and all its sub-directories, with the WatchService.- Throws:
IOException
-
processEvents
public void processEvents()
Process all events for keys queued to the watcher
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-