@NotThreadSafe public static final class ImmutableServiceCheck.Builder extends Object
ImmutableServiceCheck.
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 |
|---|---|
ImmutableServiceCheck.Builder |
addAllChecks(Iterable<? extends HealthCheck> elements)
Adds elements to
checks list. |
ImmutableServiceCheck.Builder |
addChecks(HealthCheck... elements)
Adds elements to
checks list. |
ImmutableServiceCheck.Builder |
addChecks(HealthCheck element)
Adds one element to
checks list. |
ImmutableServiceCheck |
build()
Builds a new
ImmutableServiceCheck. |
ImmutableServiceCheck.Builder |
checks(Iterable<? extends HealthCheck> elements)
Sets or replaces all elements for
checks list. |
ImmutableServiceCheck.Builder |
from(ServiceCheck instance)
Fill a builder with attribute values from the provided
ServiceCheck instance. |
ImmutableServiceCheck.Builder |
node(Node node)
Initializes the value for the
node attribute. |
ImmutableServiceCheck.Builder |
service(Service service)
Initializes the value for the
service attribute. |
public final ImmutableServiceCheck.Builder from(ServiceCheck instance)
ServiceCheck instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableServiceCheck.Builder node(Node node)
node attribute.node - The value for nodethis builder for use in a chained invocationpublic final ImmutableServiceCheck.Builder service(Service service)
service attribute.service - The value for servicethis builder for use in a chained invocationpublic final ImmutableServiceCheck.Builder addChecks(HealthCheck element)
checks list.element - A checks elementthis builder for use in a chained invocationpublic final ImmutableServiceCheck.Builder addChecks(HealthCheck... elements)
checks list.elements - An array of checks elementsthis builder for use in a chained invocationpublic final ImmutableServiceCheck.Builder checks(Iterable<? extends HealthCheck> elements)
checks list.elements - An iterable of checks elementsthis builder for use in a chained invocationpublic final ImmutableServiceCheck.Builder addAllChecks(Iterable<? extends HealthCheck> elements)
checks list.elements - An iterable of checks elementsthis builder for use in a chained invocationpublic ImmutableServiceCheck build()
ImmutableServiceCheck.IllegalStateException - if any required attributes are missingCopyright © 2018. All rights reserved.