Class ImmutableTransactionOptions.Builder

  • Enclosing class:
    ImmutableTransactionOptions

    @NotThreadSafe
    public static final class ImmutableTransactionOptions.Builder
    extends java.lang.Object
    Builds instances of type 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.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableTransactionOptions.Builder from​(TransactionOptions instance)
        Fill a builder with attribute values from the provided TransactionOptions instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • datacenter

        @CanIgnoreReturnValue
        public final ImmutableTransactionOptions.Builder datacenter​(java.lang.String datacenter)
        Initializes the optional value datacenter to datacenter.
        Parameters:
        datacenter - The value for datacenter
        Returns:
        this builder for chained invocation
      • datacenter

        @CanIgnoreReturnValue
        public final ImmutableTransactionOptions.Builder datacenter​(java.util.Optional<java.lang.String> datacenter)
        Initializes the optional value datacenter to datacenter.
        Parameters:
        datacenter - The value for datacenter
        Returns:
        this builder for use in a chained invocation
      • consistencyMode

        @CanIgnoreReturnValue
        public final ImmutableTransactionOptions.Builder consistencyMode​(ConsistencyMode consistencyMode)
        Initializes the value for the consistencyMode attribute.

        If not set, this attribute will have a default value as returned by the initializer of consistencyMode.

        Parameters:
        consistencyMode - The value for consistencyMode
        Returns:
        this builder for use in a chained invocation