synchronized public void open() throws IOException {
Preconditions.checkState(watcher == null,
"Attempting to open an already open TailDirSource (" + dir + ", \""
+ regex + ", \"" + startFromDateInEpoch + "\")");
// 250 ms between checks
this.watcher = new DirWatcher(dir, new RegexFileFilter(regex), 250);
synchronized (watcher) {
this.watcher.addHandler(new DirChangeHandler() {
Map<String, TailSource.Cursor> curmap = new HashMap<String, TailSource.Cursor>();
@Override