void () { LOG.debug("dispose"); if (!disposed.getAndSet(true)) { synchronized (watchers) { watchers.forEach(FileRefresher::unwatch); watchers.clear(); } RefreshSession session; synchronized (files) { files.clear(); session = this.session; this.session = null; } if (session != null) session.cancel(); } }