> + .name(Constants.NAME)
> + .protocol("MYSQL")
> + .port(3306)
> + .algorithm(LoadBalancer.Algorithm.RANDOM)
> + .nodes(addNodes)
> + .virtualIPType(VirtualIP.Type.PUBLIC)
> + .build();
> +
> +
> + // Retry - If the DNS record has not propagated this will fail to
> resolve on the cloud load balancer service-side
> + // Note that this will fail if the service cannot resolve the hostname
> of the database instance
> + LoadBalancer loadBalancer;
> + do {
> + loadBalancer = lbApi.create(createLB);
> + try {
> + Thread.sleep(30000);
Use Uninterruptibles.sleepUninterruptibly(sleepFor, unit) since we're single
threaded here anyway.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/6/files#r5281115