delay = pDelay;
}
public void addListener(final File pRoot, final FilesystemAlterationListener pListener) {
FilesystemAlterationObserver observer;
synchronized (observersLock) {
observer = (FilesystemAlterationObserver) observers.get(pRoot);
if (observer == null) {
final Map newObservers = new HashMap(observers);
observer = new FilesystemAlterationObserverImpl(pRoot);
newObservers.put(pRoot, observer);
observers = Collections.unmodifiableMap(newObservers);
}
}
observer.addListener(pListener);
}