public static final class HealthCheck.Builder extends Object
HealthCheck| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
HealthCheck |
build()
Builds the configured instance.
|
HealthCheck.Builder |
withHealthyThreshold(Number value)
Sets the value of HealthyThreshold
|
HealthCheck.Builder |
withInterval(Number value)
Sets the value of Interval
|
HealthCheck.Builder |
withPath(String value)
Sets the value of Path
|
HealthCheck.Builder |
withPort(Number value)
Sets the value of Port
|
HealthCheck.Builder |
withProtocol(LoadBalancingProtocol value)
Sets the value of Protocol
|
HealthCheck.Builder |
withTimeout(Number value)
Sets the value of Timeout
|
HealthCheck.Builder |
withUnhealthyThreshold(Number value)
Sets the value of UnhealthyThreshold
|
public HealthCheck.Builder withPort(Number value)
value - What port number to health check onthispublic HealthCheck.Builder withHealthyThreshold(@Nullable Number value)
value - After how many successful checks is an instance considered healthythispublic HealthCheck.Builder withInterval(@Nullable Number value)
value - Number of seconds between health checksthispublic HealthCheck.Builder withPath(@Nullable String value)
value - What path to use for HTTP or HTTPS health check (must return 200)
For SSL and TCP health checks, accepting connections is enough to be considered
healthy.thispublic HealthCheck.Builder withProtocol(@Nullable LoadBalancingProtocol value)
value - What protocol to use for health checking
The protocol is automatically determined from the port if it's not supplied.thispublic HealthCheck.Builder withTimeout(@Nullable Number value)
value - Health check timeoutthispublic HealthCheck.Builder withUnhealthyThreshold(@Nullable Number value)
value - After how many unsuccessful checks is an instance considered unhealthythispublic HealthCheck build()
HealthCheckNullPointerException - if any required attribute was not providedCopyright © 2018. All rights reserved.