code: @Override
    public void close() throws Exception {
      LOG.log(Level.FINE, "close");
  
      if (this.executor != null) {
        this.executor.shutdown();
        try {
          // wait for threads to finish for timeout
          if (!executor.awaitTermination(shutdownTimeout, TimeUnit.MILLISECONDS)) {
            LOG.log(Level.WARNING, "Executor did not terminate in {0} ms.", shutdownTimeout);
            final List<Runnable> droppedRunnables = executor.shutdownNow();
            LOG.log(Level.WARNING, "Executor dropped {0} tasks.", droppedRunnables.size());
          }
        } catch (final InterruptedException e) {
          LOG.log(Level.WARNING, "Close interrupted", e);
          throw new RemoteRuntimeException(e);
        }
      }
    }
docs: Closes the stage.