code: @SuppressWarnings("rawtypes")
      public CompletableFuture<Void> shutdownAsync(long quietPeriod, long timeout, TimeUnit timeUnit) {
  
          if (shutdown.compareAndSet(false, true)) {
  
              logger.debug("Initiate shutdown ({}, {}, {})", quietPeriod, timeout, timeUnit);
              return closeResources().thenCompose((value) -> closeClientResources(quietPeriod, timeout, timeUnit));
          }
  
          return completedFuture(null);
      }
docs: Shutdown this client and close all open connections asynchronously. The client should be discarded after calling
  shutdown.
  
  @param quietPeriod the quiet period as described in the documentation
  @param timeout the maximum amount of time to wait until the executor is shutdown regardless if a task was submitted
  during the quiet period
  @param timeUnit the unit of {@code quietPeriod} and {@code timeout}
  @since 4.4