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 file for changes. When a file's modification time changes, the callback provided by the user will be called from a background thread. Modification are detected by checking the file's attributes every polling interval. 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.

This file was originally copied from the Apache ZooKeeper project, and then modified.

See Also: