@Override
        protected void initializeImplementation() {
            try {
                CompletableFuture.allOf(cluster.allHosts().stream()
                                .map(host -> CompletableFuture.runAsync(
                                        () -> initializeConnectionSetupForHost.accept(host), cluster.hostScheduler()))
                                .toArray(CompletableFuture[]::new))
                        .join();
            } catch (CompletionException ex) {
                logger.error("Initialization failed", ex);
                this.initializationFailure = ex;
            }

            // throw an error if there is no host available after initializing connection pool.
            if (cluster.availableHosts().isEmpty())
                throwNoHostAvailableException();

            // try to re-initiate any unavailable hosts in the background.
            final List<Host> unavailableHosts = cluster.allHosts()
                    .stream().filter(host -> !host.isAvailable()).collect(Collectors.toList());
            if (!unavailableHosts.isEmpty()) {
                handleUnavailableHosts(unavailableHosts);
            }
        }
Initializes the connection pools on all hosts.
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java