Class FileWatcher

All Implemented Interfaces:

public class FileWatcher
extends AbstractResourceWatcher<FileChangesListener>
File resources watcher The file watcher checks directory and all its subdirectories for file changes and notifies its listeners accordingly
  • Constructor Summary

    Constructor Description
    FileWatcher​(java.nio.file.Path file)
    Creates new file watcher on the given directory
  • Method Summary

    Modifier and Type Method Description
    void clearState()
    Clears any state with the FileWatcher, making all files show up as new
    protected void doCheckAndNotify()
    Will be called periodically
    protected void doInit()
    Will be called once on initialization

    Methods inherited from class org.elasticsearch.watcher.AbstractResourceWatcher

    addListener, checkAndNotify, init, listeners, remove

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait