public CompletableFuture<Void> close() {
    CompletableFuture[] futures = new CompletableFuture[connections.size()];

    for (CompletableFuture<Connection> future : this.connectionFutures.values()) {
      future.cancel(false);
    }

    int i = 0;
    for (Connection connection : connections.values()) {
      futures[i++] = connection.close();
    }

    return CompletableFuture.allOf(futures);
  }
public CompletableFuture < Void > close ( ) { CompletableFuture [ ] futures = new CompletableFuture [ connections . size ( ) ] ; for ( CompletableFuture < Connection > future : this . connectionFutures . values ( ) ) { future . cancel ( false ) ; } int i = 0 ; for ( Connection connection : connections . values ( ) ) { futures [ i ++ ] = connection . close ( ) ; } return CompletableFuture . allOf ( futures ) ; }
Closes the connection manager.

@return A completable future to be completed once the connection manager is closed.