@NotThreadSafe public static final class ImmutableQueryOptions.Builder extends Object
ImmutableQueryOptions.
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 |
|---|---|
ImmutableQueryOptions.Builder |
addAllNodeMeta(Iterable<String> elements)
Adds elements to
nodeMeta list. |
ImmutableQueryOptions.Builder |
addAllTag(Iterable<String> elements)
Adds elements to
tag list. |
ImmutableQueryOptions.Builder |
addNodeMeta(String... elements)
Adds elements to
nodeMeta list. |
ImmutableQueryOptions.Builder |
addNodeMeta(String element)
Adds one element to
nodeMeta list. |
ImmutableQueryOptions.Builder |
addTag(String... elements)
Adds elements to
tag list. |
ImmutableQueryOptions.Builder |
addTag(String element)
Adds one element to
tag list. |
ImmutableQueryOptions |
build()
Builds a new
ImmutableQueryOptions. |
ImmutableQueryOptions.Builder |
consistencyMode(ConsistencyMode consistencyMode)
Initializes the value for the
consistencyMode attribute. |
ImmutableQueryOptions.Builder |
datacenter(Optional<String> datacenter)
Initializes the optional value
datacenter to datacenter. |
ImmutableQueryOptions.Builder |
datacenter(String datacenter)
Initializes the optional value
datacenter to datacenter. |
ImmutableQueryOptions.Builder |
from(QueryOptions instance)
Fill a builder with attribute values from the provided
QueryOptions instance. |
ImmutableQueryOptions.Builder |
hash(Optional<String> hash)
Initializes the optional value
hash to hash. |
ImmutableQueryOptions.Builder |
hash(String hash)
Initializes the optional value
hash to hash. |
ImmutableQueryOptions.Builder |
index(BigInteger index)
Initializes the optional value
index to index. |
ImmutableQueryOptions.Builder |
index(Optional<? extends BigInteger> index)
Initializes the optional value
index to index. |
ImmutableQueryOptions.Builder |
near(Optional<String> near)
Initializes the optional value
near to near. |
ImmutableQueryOptions.Builder |
near(String near)
Initializes the optional value
near to near. |
ImmutableQueryOptions.Builder |
nodeMeta(Iterable<String> elements)
Sets or replaces all elements for
nodeMeta list. |
ImmutableQueryOptions.Builder |
tag(Iterable<String> elements)
Sets or replaces all elements for
tag list. |
ImmutableQueryOptions.Builder |
token(Optional<String> token)
Initializes the optional value
token to token. |
ImmutableQueryOptions.Builder |
token(String token)
Initializes the optional value
token to token. |
ImmutableQueryOptions.Builder |
wait(Optional<String> wait)
Initializes the optional value
wait to wait. |
ImmutableQueryOptions.Builder |
wait(String wait)
Initializes the optional value
wait to wait. |
@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder from(QueryOptions instance)
QueryOptions 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 invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder wait(String wait)
wait to wait.wait - The value for waitthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder wait(Optional<String> wait)
wait to wait.wait - The value for waitthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder token(String token)
token to token.token - The value for tokenthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder token(Optional<String> token)
token to token.token - The value for tokenthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder hash(String hash)
hash to hash.hash - The value for hashthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder hash(Optional<String> hash)
hash to hash.hash - The value for hashthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder index(BigInteger index)
index to index.index - The value for indexthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder index(Optional<? extends BigInteger> index)
index to index.index - The value for indexthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder near(String near)
near to near.near - The value for nearthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder near(Optional<String> near)
near to near.near - The value for nearthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder datacenter(String datacenter)
datacenter to datacenter.datacenter - The value for datacenterthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder datacenter(Optional<String> datacenter)
datacenter to datacenter.datacenter - The value for datacenterthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder addNodeMeta(String element)
nodeMeta list.element - A nodeMeta elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder addNodeMeta(String... elements)
nodeMeta list.elements - An array of nodeMeta elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder nodeMeta(Iterable<String> elements)
nodeMeta list.elements - An iterable of nodeMeta elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder addAllNodeMeta(Iterable<String> elements)
nodeMeta list.elements - An iterable of nodeMeta elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder addTag(String element)
tag list.element - A tag elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder addTag(String... elements)
tag list.elements - An array of tag elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder tag(Iterable<String> elements)
tag list.elements - An iterable of tag elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder addAllTag(Iterable<String> elements)
tag list.elements - An iterable of tag elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableQueryOptions.Builder consistencyMode(ConsistencyMode consistencyMode)
consistencyMode attribute.
If not set, this attribute will have a default value as returned by the initializer of consistencyMode.
consistencyMode - The value for consistencyModethis builder for use in a chained invocationpublic ImmutableQueryOptions build()
ImmutableQueryOptions.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.