public static final class ImmutableHealthCheck.Builder extends Object
ImmutableHealthCheck.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutableHealthCheck |
build()
Builds a new
ImmutableHealthCheck. |
ImmutableHealthCheck.Builder |
checkId(String checkId)
Initializes the value for the
checkId attribute. |
ImmutableHealthCheck.Builder |
from(HealthCheck instance)
Fill a builder with attribute values from the provided
HealthCheck instance. |
ImmutableHealthCheck.Builder |
name(String name)
Initializes the value for the
name attribute. |
ImmutableHealthCheck.Builder |
node(String node)
Initializes the value for the
node attribute. |
ImmutableHealthCheck.Builder |
notes(com.google.common.base.Optional<String> notes)
Initializes the optional value
notes to notes. |
ImmutableHealthCheck.Builder |
notes(String notes)
Initializes the optional value
notes to notes. |
ImmutableHealthCheck.Builder |
output(com.google.common.base.Optional<String> output)
Initializes the optional value
output to output. |
ImmutableHealthCheck.Builder |
output(String output)
Initializes the optional value
output to output. |
ImmutableHealthCheck.Builder |
serviceId(com.google.common.base.Optional<String> serviceId)
Initializes the optional value
serviceId to serviceId. |
ImmutableHealthCheck.Builder |
serviceId(String serviceId)
Initializes the optional value
serviceId to serviceId. |
ImmutableHealthCheck.Builder |
serviceName(com.google.common.base.Optional<String> serviceName)
Initializes the optional value
serviceName to serviceName. |
ImmutableHealthCheck.Builder |
serviceName(String serviceName)
Initializes the optional value
serviceName to serviceName. |
ImmutableHealthCheck.Builder |
status(String status)
Initializes the value for the
status attribute. |
public final ImmutableHealthCheck.Builder from(HealthCheck instance)
HealthCheck instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder node(String node)
node attribute.node - The value for nodethis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder checkId(String checkId)
checkId attribute.checkId - The value for checkIdthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder name(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder status(String status)
status attribute.status - The value for statusthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder notes(String notes)
notes to notes.notes - The value for notesthis builder for chained invocationpublic final ImmutableHealthCheck.Builder notes(com.google.common.base.Optional<String> notes)
notes to notes.notes - The value for notesthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder output(String output)
output to output.output - The value for outputthis builder for chained invocationpublic final ImmutableHealthCheck.Builder output(com.google.common.base.Optional<String> output)
output to output.output - The value for outputthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder serviceId(String serviceId)
serviceId to serviceId.serviceId - The value for serviceIdthis builder for chained invocationpublic final ImmutableHealthCheck.Builder serviceId(com.google.common.base.Optional<String> serviceId)
serviceId to serviceId.serviceId - The value for serviceIdthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder serviceName(String serviceName)
serviceName to serviceName.serviceName - The value for serviceNamethis builder for chained invocationpublic final ImmutableHealthCheck.Builder serviceName(com.google.common.base.Optional<String> serviceName)
serviceName to serviceName.serviceName - The value for serviceNamethis builder for use in a chained invocationpublic ImmutableHealthCheck build()
ImmutableHealthCheck.IllegalStateException - if any required attributes are missingCopyright © 2016. All rights reserved.