public static class HealthChecker.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
HealthChecker |
build() |
HealthChecker.Builder |
copy(HealthChecker model) |
HealthChecker.Builder |
intervalInMillis(Integer intervalInMillis)
The interval between health checks, in milliseconds.
|
HealthChecker.Builder |
isForcePlainText(Boolean isForcePlainText)
Specifies if health checks should always be done using plain text instead of depending on
whether or not the associated backend set is using SSL.
|
HealthChecker.Builder |
port(Integer port)
The backend server port against which to run the health check.
|
HealthChecker.Builder |
protocol(String protocol)
The protocol the health check must use; either HTTP or TCP.
|
HealthChecker.Builder |
responseBodyRegex(String responseBodyRegex)
A regular expression for parsing the response body from the backend server.
|
HealthChecker.Builder |
retries(Integer retries)
The number of retries to attempt before a backend server is considered “unhealthy”.
|
HealthChecker.Builder |
returnCode(Integer returnCode)
The status code a healthy backend server should return.
|
HealthChecker.Builder |
timeoutInMillis(Integer timeoutInMillis)
The maximum time, in milliseconds, to wait for a reply to a health check.
|
HealthChecker.Builder |
urlPath(String urlPath)
The path against which to run the health check.
|
public HealthChecker.Builder protocol(String protocol)
The protocol the health check must use; either HTTP or TCP.
Example: HTTP
protocol
- the value to setpublic HealthChecker.Builder urlPath(String urlPath)
The path against which to run the health check.
Example: /healthcheck
urlPath
- the value to setpublic HealthChecker.Builder port(Integer port)
The backend server port against which to run the health check. If the port is not
specified, the load balancer uses the port information from the Backend
object.
Example: 8080
port
- the value to setpublic HealthChecker.Builder returnCode(Integer returnCode)
The status code a healthy backend server should return. If you configure the health check policy to use the HTTP protocol, you can use common HTTP status codes such as “200”.
Example: 200
returnCode
- the value to setpublic HealthChecker.Builder retries(Integer retries)
The number of retries to attempt before a backend server is considered “unhealthy”. This number also applies when recovering a server to the “healthy” state. Defaults to 3.
Example: 3
retries
- the value to setpublic HealthChecker.Builder timeoutInMillis(Integer timeoutInMillis)
The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply returns within this timeout period. Defaults to 3000 (3 seconds).
Example: 3000
timeoutInMillis
- the value to setpublic HealthChecker.Builder intervalInMillis(Integer intervalInMillis)
The interval between health checks, in milliseconds. The default is 10000 (10 seconds).
Example: 10000
intervalInMillis
- the value to setpublic HealthChecker.Builder responseBodyRegex(String responseBodyRegex)
A regular expression for parsing the response body from the backend server.
Example: ^((?!false).|\\s)*$
responseBodyRegex
- the value to setpublic HealthChecker.Builder isForcePlainText(Boolean isForcePlainText)
Specifies if health checks should always be done using plain text instead of depending on whether or not the associated backend set is using SSL.
If "true", health checks will be done using plain text even if the associated backend set is configured to use SSL.
If "false", health checks will be done using SSL encryption if the associated backend set is configured to use SSL. If the backend set is not so configured the health checks will be done using plain text.
Example: false
isForcePlainText
- the value to setpublic HealthChecker build()
public HealthChecker.Builder copy(HealthChecker model)
Copyright © 2016–2024. All rights reserved.