docs: private void watchFilesTask() {
          while (!watcherExecutor.isShutdown()) {
              try {
                  WatchKey key = watchService.take();
                  Path parent = watchKeyDirs.get(key);
                  if (parent == null) {
                      key.reset();
                      continue;
                  }
  
                  Set<Path> updates = new TreeSet<>();
                  for (WatchEvent<?> ev : key.pollEvents()) {
                      WatchEvent.Kind<?> kind = ev.kind();
  
                      // Only file modification, creation, deletion is interesting.
                      if (kind != ENTRY_MODIFY &&
                          kind != ENTRY_CREATE &&
                          kind != ENTRY_DELETE) {
                          if (kind == OVERFLOW) {
                              LOGGER.warn("Overflow event, file updates may have been lost");
                          }
                          continue;
                      }
  
                      @SuppressWarnings("unchecked")
                      WatchEvent<Path> event = (WatchEvent<Path>) ev;
  
                      Path file = parent.resolve(event.context());
                      if (targetToRequests.containsKey(file)) {
                          LOGGER.trace("Watched file " + file + " event " + kind);
                          updates.add(file);
                      }
                  }
                  // Ready the key again so it wil signal more events.
                  key.reset();
  
                  if (updates.size() > 0) {
                      List<Supplier<Listener>>           watcherList;
                      Map<Path,List<Supplier<Listener>>> watcherMap;
                      Set<Path>                          updatedRequests = new TreeSet<>();
                      synchronized (mutex) {
                          watcherList = new ArrayList<>(this.watchers);
                          watcherMap = deepCopy(watchedFiles);
  
                          for (final Path file : updates) {
                              updatedRequests.addAll(targetToRequests.getOrDefault(file, Collections.emptySet()));
                          }
                          for (final Path file : updates) {
                              try {
                                  updateLinkTargetting(file);
                              } catch (IOException e) {
                                  LOGGER.warn("Failed to update link targeting: {}", e.getMessage(), e);
                              }
                          }
                      }
  
                      callbackExecutor.submit(() -> {
                          for (final Path file : updates) {
                              for (final Supplier<Listener> supplier : watcherList) {
                                  Listener watcher = supplier.get();
                                  if (watcher != null) {
                                      try {
                                          watcher.onPathUpdate(file);
                                      } catch (RuntimeException e) {
                                          LOGGER.error("Exception when notifying update on " + file, e);
                                      }
                                  }
                              }
                          }
                          for (Path request : updatedRequests) {
                              Optional.ofNullable(watcherMap.get(request))
                                      .ifPresent(list -> {
                                          for (final Supplier<Listener> supplier : list) {
                                              Listener watcher = supplier.get();
                                              if (watcher != null) {
                                                  try {
                                                      watcher.onPathUpdate(request);
                                                  } catch (RuntimeException e) {
                                                      LOGGER.error("Exception when notifying update on " + request, e);
                                                  }
                                              }
                                          }
                                      });
                          }
                      });
                  }
              } catch (InterruptedException interruptedEx) {
                  LOGGER.error("Interrupted in service file watch thread: " + interruptedEx.getMessage(), interruptedEx);
                  return;
              }
          }
      }