Class TransactionOptions


public class TransactionOptions extends Object
Provides all configurable parameters for a single Couchbase transaction.
  • Method Details

    • transactionOptions

      public static TransactionOptions transactionOptions()
      Returns a new TransactionOptions.Builder, which can be used to build up and create a CoreTransactionOptions.
    • build

    • durabilityLevel

      public TransactionOptions durabilityLevel(DurabilityLevel durabilityLevel)
      Overrides the default durability set, for this transaction. The level will be used for all operations inside the transaction.
      durabilityLevel - the durability level to set
      this, for chaining
    • parentSpan

      public TransactionOptions parentSpan(RequestSpan parentSpan)
      Specifies the RequestSpan that's a parent for this transaction.

      RequestSpan is a Couchbase Java SDK abstraction over an underlying tracing implementation such as OpenTelemetry or OpenTracing.

      this, for chaining
    • timeout

      public TransactionOptions timeout(Duration timeout)
      Overrides the default timeout set, for this transaction.
      this, for chaining
    • metadataCollection

      public TransactionOptions metadataCollection(Collection collection)
      Allows setting a custom collection to use for any transactional metadata documents created by this transaction.

      If not set, it will default to creating these documents in the default collection of the bucket that the first mutated document in the transaction is on.