public interface FileChangeListener
public class MyListener implements FileChangeListener { long lastNotif = 0; public void fileChanged(File file, long since, long now) { if (now == lastNotifFlush) return; if (isIntersetedInFile(file)) { lastNotif = now; flushCache(); // flush internal cache because file on disk changed } } }
Modifier and Type | Method and Description |
---|---|
void |
fileChanged(FileChangeNotifier.FileEntry entry,
long now)
Notifies that the given file changed.
|
void fileChanged(FileChangeNotifier.FileEntry entry, long now)
entry
- now
- the time stamp when the change was detected. This value can be used as a notification ID by listeners
to avoid multiple processing for notification that will send multiple eventsCopyright © 2015 Nuxeo SA. All rights reserved.