@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableQueryOptions extends QueryOptions
QueryOptions.
Use the builder to create immutable instances:
ImmutableQueryOptions.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableQueryOptions.Builder
Builds instances of type
ImmutableQueryOptions. |
BLANK| Modifier and Type | Method and Description |
|---|---|
static ImmutableQueryOptions.Builder |
builder()
Creates a builder for
ImmutableQueryOptions. |
static ImmutableQueryOptions |
copyOf(QueryOptions instance)
Creates an immutable copy of a
QueryOptions value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableQueryOptions that have equal attribute values. |
ConsistencyMode |
getConsistencyMode() |
Optional<String> |
getDatacenter() |
Optional<BigInteger> |
getIndex() |
Optional<String> |
getNear() |
com.google.common.collect.ImmutableList<String> |
getNodeMeta() |
List<String> |
getNodeMetaQuery() |
com.google.common.collect.ImmutableList<String> |
getTag() |
List<String> |
getTagsQuery() |
Optional<String> |
getToken() |
Optional<String> |
getWait() |
int |
hashCode()
Computes a hash code from attributes:
wait, token, index, near, datacenter, nodeMeta, tag, consistencyMode, isBlocking, hasToken, nodeMetaQuery, tagsQuery. |
boolean |
hasToken() |
boolean |
isBlocking() |
String |
toString()
Prints the immutable value
QueryOptions with attribute values. |
ImmutableQueryOptions |
withConsistencyMode(ConsistencyMode value)
Copy the current immutable object by setting a value for the
consistencyMode attribute. |
ImmutableQueryOptions |
withDatacenter(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
datacenter attribute. |
ImmutableQueryOptions |
withDatacenter(String value)
Copy the current immutable object by setting a present value for the optional
datacenter attribute. |
ImmutableQueryOptions |
withIndex(BigInteger value)
Copy the current immutable object by setting a present value for the optional
index attribute. |
ImmutableQueryOptions |
withIndex(Optional<? extends BigInteger> optional)
Copy the current immutable object by setting an optional value for the
index attribute. |
ImmutableQueryOptions |
withNear(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
near attribute. |
ImmutableQueryOptions |
withNear(String value)
Copy the current immutable object by setting a present value for the optional
near attribute. |
ImmutableQueryOptions |
withNodeMeta(Iterable<String> elements)
Copy the current immutable object with elements that replace the content of
nodeMeta. |
ImmutableQueryOptions |
withNodeMeta(String... elements)
Copy the current immutable object with elements that replace the content of
nodeMeta. |
ImmutableQueryOptions |
withTag(Iterable<String> elements)
Copy the current immutable object with elements that replace the content of
tag. |
ImmutableQueryOptions |
withTag(String... elements)
Copy the current immutable object with elements that replace the content of
tag. |
ImmutableQueryOptions |
withToken(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
token attribute. |
ImmutableQueryOptions |
withToken(String value)
Copy the current immutable object by setting a present value for the optional
token attribute. |
ImmutableQueryOptions |
withWait(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
wait attribute. |
ImmutableQueryOptions |
withWait(String value)
Copy the current immutable object by setting a present value for the optional
wait attribute. |
blockMinutes, blockSeconds, toQuerypublic Optional<String> getWait()
getWait in class QueryOptionswait attributepublic Optional<String> getToken()
getToken in class QueryOptionstoken attributepublic Optional<BigInteger> getIndex()
getIndex in class QueryOptionsindex attributepublic Optional<String> getNear()
getNear in class QueryOptionsnear attributepublic Optional<String> getDatacenter()
getDatacenter in class QueryOptionsdatacenter attributepublic com.google.common.collect.ImmutableList<String> getNodeMeta()
getNodeMeta in class QueryOptionsnodeMeta attributepublic com.google.common.collect.ImmutableList<String> getTag()
getTag in class QueryOptionstag attributepublic ConsistencyMode getConsistencyMode()
getConsistencyMode in class QueryOptionsconsistencyMode attributepublic boolean isBlocking()
isBlocking in class QueryOptionsisBlocking attributepublic boolean hasToken()
hasToken in class QueryOptionshasToken attributepublic List<String> getNodeMetaQuery()
getNodeMetaQuery in class QueryOptionsnodeMetaQuery attributepublic List<String> getTagsQuery()
getTagsQuery in class QueryOptionstagsQuery attributepublic final ImmutableQueryOptions withWait(String value)
wait attribute.value - The value for waitthis objectpublic final ImmutableQueryOptions withWait(Optional<String> optional)
wait attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for waitthis objectpublic final ImmutableQueryOptions withToken(String value)
token attribute.value - The value for tokenthis objectpublic final ImmutableQueryOptions withToken(Optional<String> optional)
token attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for tokenthis objectpublic final ImmutableQueryOptions withIndex(BigInteger value)
index attribute.value - The value for indexthis objectpublic final ImmutableQueryOptions withIndex(Optional<? extends BigInteger> optional)
index attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for indexthis objectpublic final ImmutableQueryOptions withNear(String value)
near attribute.value - The value for nearthis objectpublic final ImmutableQueryOptions withNear(Optional<String> optional)
near attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for nearthis objectpublic final ImmutableQueryOptions withDatacenter(String value)
datacenter attribute.value - The value for datacenterthis objectpublic final ImmutableQueryOptions withDatacenter(Optional<String> optional)
datacenter attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for datacenterthis objectpublic final ImmutableQueryOptions withNodeMeta(String... elements)
nodeMeta.elements - The elements to setthis objectpublic final ImmutableQueryOptions withNodeMeta(Iterable<String> elements)
nodeMeta.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of nodeMeta elements to setthis objectpublic final ImmutableQueryOptions withTag(String... elements)
tag.elements - The elements to setthis objectpublic final ImmutableQueryOptions withTag(Iterable<String> elements)
tag.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of tag elements to setthis objectpublic final ImmutableQueryOptions withConsistencyMode(ConsistencyMode value)
consistencyMode attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for consistencyModethis objectpublic boolean equals(@Nullable Object another)
ImmutableQueryOptions that have equal attribute values.public int hashCode()
wait, token, index, near, datacenter, nodeMeta, tag, consistencyMode, isBlocking, hasToken, nodeMetaQuery, tagsQuery.public String toString()
QueryOptions with attribute values.public static ImmutableQueryOptions copyOf(QueryOptions instance)
QueryOptions value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableQueryOptions.Builder builder()
ImmutableQueryOptions.
ImmutableQueryOptions.builder()
.wait(String) // optional wait
.token(String) // optional token
.index(java.math.BigInteger) // optional index
.near(String) // optional near
.datacenter(String) // optional datacenter
.addNodeMeta|addAllNodeMeta(String) // nodeMeta elements
.addTag|addAllTag(String) // tag elements
.consistencyMode(com.orbitz.consul.option.ConsistencyMode) // optional consistencyMode
.build();
Copyright © 2019. All rights reserved.