code: public void cancel() {
      try {
        executorService.shutdown();
        if (!executorService.awaitTermination(30, TimeUnit.MINUTES)) {
          executorService.shutdownNow(); // Cancel currently executing tasks
          if (!executorService.awaitTermination(30, TimeUnit.MINUTES)) {
            LOGGER.error("Pool did not terminate... FATAL ERROR");
            throw new RuntimeException("Parallel SAX pool did not terminate... FATAL ERROR");
          }
        }
        else {
          LOGGER.error("Parallel SAX was interrupted by a request");
        }
      }
      catch (InterruptedException ie) {
        LOGGER.error("Error while waiting interrupting.", ie);
        // (Re-)Cancel if current thread also interrupted
        executorService.shutdownNow();
        // Preserve interrupt status
        Thread.currentThread().interrupt();
      }
    }
docs: Cancels the execution.