Class FileChangeWatcher

java.lang.Object
org.apache.hadoop.hbase.io.FileChangeWatcher

@Private public final class FileChangeWatcher extends Object
Instances of this class can be used to watch a directory for file changes. When a file is added to, deleted from, or is modified in the given directory, the callback provided by the user will be called from a background thread. Some things to keep in mind:
  • The callback should be thread-safe.
  • Changes that happen around the time the thread is started may be missed.
  • There is a delay between a file changing and the callback firing.
  • The watch is not recursive - changes to subdirectories will not trigger a callback.

This file has been copied from the Apache ZooKeeper project.

See Also: