@NotThreadSafe public static final class ImmutableTransactionOptions.Builder extends Object
ImmutableTransactionOptions.
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 |
|---|---|
ImmutableTransactionOptions |
build()
Builds a new
ImmutableTransactionOptions. |
ImmutableTransactionOptions.Builder |
consistencyMode(ConsistencyMode consistencyMode)
Initializes the value for the
consistencyMode attribute. |
ImmutableTransactionOptions.Builder |
datacenter(Optional<String> datacenter)
Initializes the optional value
datacenter to datacenter. |
ImmutableTransactionOptions.Builder |
datacenter(String datacenter)
Initializes the optional value
datacenter to datacenter. |
ImmutableTransactionOptions.Builder |
from(TransactionOptions instance)
Fill a builder with attribute values from the provided
TransactionOptions instance. |
public final ImmutableTransactionOptions.Builder from(TransactionOptions instance)
TransactionOptions 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 ImmutableTransactionOptions.Builder datacenter(String datacenter)
datacenter to datacenter.datacenter - The value for datacenterthis builder for chained invocationpublic final ImmutableTransactionOptions.Builder datacenter(Optional<String> datacenter)
datacenter to datacenter.datacenter - The value for datacenterthis builder for use in a chained invocationpublic final ImmutableTransactionOptions.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 ImmutableTransactionOptions build()
ImmutableTransactionOptions.IllegalStateException - if any required attributes are missingCopyright © 2018. All rights reserved.