jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)
Date Mon, 03 Nov 2014 21:16:35 GMT
> -                 .unhealthyThreshold(in.getUnhealthyThreshold().orNull())
> -                 .healthyThreshold(in.getHealthyThreshold().orNull());
> -      }
> +   /** An unhealthy VM will be marked healthy after this many consecutive successes.
*/
> +   public abstract int healthyThreshold();
> +
> +   @SerializedNames(
> +         { "id", "selfLink", "name", "description", "host", "requestPath", "port", "checkIntervalSec",
"timeoutSec",
> +               "unhealthyThreshold", "healthyThreshold" })
> +   public static HttpHealthCheck create(String id, URI selfLink, String name, String
description, String host,
> +         String requestPath, Integer port, Integer checkIntervalSec, Integer timeoutSec,
Integer unhealthyThreshold,
> +         Integer healthyThreshold) {
> +      return new AutoValue_HttpHealthCheck(id, selfLink, name, description, host,
> +            requestPath != null ? requestPath : "/", port != null ? port : 80,
> +            checkIntervalSec != null ? checkIntervalSec : 5, timeoutSec != null ? timeoutSec
: 5,
> +            unhealthyThreshold != null ? unhealthyThreshold : 2, healthyThreshold !=
null ? healthyThreshold : 2);

Worth describing these defaults in the doc anywhere?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19764673
Mime
View raw message