public boolean removeWatcher ( Listener watcher ) { if ( watcher == null ) { throw new IllegalArgumentException ( "Null watcher removed" ) ; } synchronized ( mutex ) { AtomicBoolean removed = new AtomicBoolean ( removeFromListeners ( watchers , watcher ) ) ; watchedFiles . forEach ( ( path , suppliers ) -> { if ( removeFromListeners ( suppliers , watcher ) ) { removed . set ( true ) ; } } ) ; return removed . get ( ) ; } }
Remove a watcher from the list of listeners .