code: private Watcher wrapWatcher(final Watcher watcher) {
      if (watcher == null) {
        return null;
      }
      return new Watcher() {
        @Override
        public void process(final WatchedEvent event) {
          if (eventExecutor.isShutdown()) {
            LOG.debug("Already shutdown. Discarding event: {}", event);
            return;
          }
          eventExecutor.execute(new Runnable() {
            @Override
            public void run() {
              try {
                watcher.process(event);
              } catch (Throwable t) {
                LOG.error("Watcher throws exception.", t);
              }
            }
          });
        }
      };
    }
docs: Wraps the given watcher to be called from the event executor.
  @param watcher Watcher to be wrapped
  @return The wrapped Watcher