code: @Override public void shutdown() {
          if (isStarted()) {
              future.cancel(true);
              executorService.shutdown();
              future = null;
              executorService = null;
              watchedFiles = ImmutableSet.of();
              callback = null;
              metadataCacheRef.set(ImmutableMap.of());
              stats.clear();
          }
      }
docs: Stops polling the files for changes. Should be called during server shutdown or when this watcher is no
  longer needed to make sure the background thread is stopped.