@ Deprecated public void weakAddWatcher ( Listener watcher ) { if ( watcher == null ) { throw new IllegalArgumentException ( "Null watcher added" ) ; } synchronized ( mutex ) { if ( watcherExecutor . isShutdown ( ) ) { throw new IllegalStateException ( "Adding watcher on closed FileWatcher" ) ; } watchers . add ( new WeakReference <> ( watcher ) :: get ) ; } }
Add a non - persistent file watcher .