@NotThreadSafe public static final class ImmutableServiceQuery.Builder extends Object
ImmutableServiceQuery.
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 |
|---|---|
ImmutableServiceQuery |
build()
Builds a new
ImmutableServiceQuery. |
ImmutableServiceQuery.Builder |
failover(Failover failover)
Initializes the optional value
failover to failover. |
ImmutableServiceQuery.Builder |
failover(Optional<? extends Failover> failover)
Initializes the optional value
failover to failover. |
ImmutableServiceQuery.Builder |
from(ServiceQuery instance)
Fill a builder with attribute values from the provided
ServiceQuery instance. |
ImmutableServiceQuery.Builder |
onlyPassing(boolean onlyPassing)
Initializes the optional value
onlyPassing to onlyPassing. |
ImmutableServiceQuery.Builder |
onlyPassing(Optional<Boolean> onlyPassing)
Initializes the optional value
onlyPassing to onlyPassing. |
ImmutableServiceQuery.Builder |
service(String service)
Initializes the value for the
service attribute. |
ImmutableServiceQuery.Builder |
tags(List<String> tags)
Initializes the optional value
tags to tags. |
ImmutableServiceQuery.Builder |
tags(Optional<? extends List<String>> tags)
Initializes the optional value
tags to tags. |
@CanIgnoreReturnValue public final ImmutableServiceQuery.Builder from(ServiceQuery instance)
ServiceQuery 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 invocation@CanIgnoreReturnValue public final ImmutableServiceQuery.Builder service(String service)
service attribute.service - The value for servicethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceQuery.Builder onlyPassing(boolean onlyPassing)
onlyPassing to onlyPassing.onlyPassing - The value for onlyPassingthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableServiceQuery.Builder onlyPassing(Optional<Boolean> onlyPassing)
onlyPassing to onlyPassing.onlyPassing - The value for onlyPassingthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceQuery.Builder tags(List<String> tags)
tags to tags.tags - The value for tagsthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableServiceQuery.Builder tags(Optional<? extends List<String>> tags)
tags to tags.tags - The value for tagsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceQuery.Builder failover(Failover failover)
failover to failover.failover - The value for failoverthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableServiceQuery.Builder failover(Optional<? extends Failover> failover)
failover to failover.failover - The value for failoverthis builder for use in a chained invocationpublic ImmutableServiceQuery build()
ImmutableServiceQuery.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.