public class TransactionOptions extends Object
Modifier and Type | Method and Description |
---|---|
com.couchbase.client.core.transaction.config.CoreTransactionOptions |
build() |
TransactionOptions |
durabilityLevel(com.couchbase.client.core.msg.kv.DurabilityLevel durabilityLevel)
Overrides the default durability set, for this transaction.
|
TransactionOptions |
metadataCollection(Collection collection)
Allows setting a custom collection to use for any transactional metadata documents created by this transaction.
|
TransactionOptions |
parentSpan(com.couchbase.client.core.cnc.RequestSpan parentSpan)
Specifies the RequestSpan that's a parent for this transaction.
|
TransactionOptions |
timeout(Duration timeout)
Overrides the default timeout set, for this transaction.
|
static TransactionOptions |
transactionOptions()
Returns a new
TransactionOptions.Builder , which can be used to build up and create a
CoreTransactionOptions . |
public static TransactionOptions transactionOptions()
TransactionOptions.Builder
, which can be used to build up and create a
CoreTransactionOptions
.@Stability.Internal public com.couchbase.client.core.transaction.config.CoreTransactionOptions build()
public TransactionOptions durabilityLevel(com.couchbase.client.core.msg.kv.DurabilityLevel durabilityLevel)
durabilityLevel
- the durability level to setpublic TransactionOptions parentSpan(com.couchbase.client.core.cnc.RequestSpan parentSpan)
RequestSpan is a Couchbase Java SDK abstraction over an underlying tracing implementation such as OpenTelemetry or OpenTracing.
public TransactionOptions timeout(Duration timeout)
public TransactionOptions metadataCollection(Collection collection)
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.
Copyright © 2024 Couchbase, Inc.. All rights reserved.