Class DockerHealthCheck.Builder
- java.lang.Object
-
- com.google.cloud.tools.jib.configuration.DockerHealthCheck.Builder
-
- Enclosing class:
- DockerHealthCheck
public static class DockerHealthCheck.Builder extends java.lang.Object
Builds the immutableDockerHealthCheck
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DockerHealthCheck
build()
DockerHealthCheck.Builder
setInterval(java.time.Duration interval)
Sets the time between healthchecks.DockerHealthCheck.Builder
setRetries(int retries)
Sets the number of times to retry the healthcheck before the container is considered to be unhealthy.DockerHealthCheck.Builder
setStartPeriod(java.time.Duration startPeriod)
Sets the initialization time to wait before using healthchecks.DockerHealthCheck.Builder
setTimeout(java.time.Duration timeout)
Sets the time until a healthcheck is considered hung.
-
-
-
Method Detail
-
setInterval
public DockerHealthCheck.Builder setInterval(java.time.Duration interval)
Sets the time between healthchecks.- Parameters:
interval
- the duration to wait between healthchecks.- Returns:
- this
-
setTimeout
public DockerHealthCheck.Builder setTimeout(java.time.Duration timeout)
Sets the time until a healthcheck is considered hung.- Parameters:
timeout
- the duration to wait until considering the healthcheck to be hung.- Returns:
- this
-
setStartPeriod
public DockerHealthCheck.Builder setStartPeriod(java.time.Duration startPeriod)
Sets the initialization time to wait before using healthchecks.- Parameters:
startPeriod
- the duration to wait before using healthchecks- Returns:
- this
-
setRetries
public DockerHealthCheck.Builder setRetries(int retries)
Sets the number of times to retry the healthcheck before the container is considered to be unhealthy.- Parameters:
retries
- the number of retries before the container is considered to be unhealthy- Returns:
- this
-
build
public DockerHealthCheck build()
-
-