code: private void connect(CompletableFuture<Connection> future) {
      if (!selector.hasNext()) {
        LOGGER.debug("{} - Failed to connect to the cluster", id);
        future.complete(null);
      } else {
        Address address = selector.next();
        LOGGER.debug("{} - Connecting to {}", id, address);
        client.connect(address).whenComplete((c, e) -> handleConnection(address, c, e, future));
      }
    }
docs: Attempts to connect to the cluster.