code: public CompletableFuture<Void> close() {
      for (OperationAttempt attempt : new ArrayList<>(attempts.values())) {
        attempt.fail(new ClosedSessionException("session closed"));
      }
      attempts.clear();
      return CompletableFuture.completedFuture(null);
    }
docs: Closes the submitter.
  
  @return A completable future to be completed with a list of pending operations.