Class TransactionOptions
java.lang.Object
com.couchbase.client.java.transactions.config.TransactionOptions
Provides all configurable parameters for a single Couchbase transaction.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
durabilityLevel
(DurabilityLevel durabilityLevel) Overrides the default durability set, for this transaction.metadataCollection
(Collection collection) Allows setting a custom collection to use for any transactional metadata documents created by this transaction.parentSpan
(RequestSpan parentSpan) Specifies the RequestSpan that's a parent for this transaction.Overrides the default timeout set, for this transaction.static TransactionOptions
Returns a newTransactionOptions.Builder
, which can be used to build up and create aCoreTransactionOptions
.
-
Method Details
-
transactionOptions
Returns a newTransactionOptions.Builder
, which can be used to build up and create aCoreTransactionOptions
. -
build
-
durabilityLevel
Overrides the default durability set, for this transaction. The level will be used for all operations inside the transaction.- Parameters:
durabilityLevel
- the durability level to set- Returns:
- this, for chaining
-
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.
- Returns:
- this, for chaining
-
timeout
Overrides the default timeout set, for this transaction.- Returns:
- this, for chaining
-
metadataCollection
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.
-