Class SingleQueryTransactionConfigBuilder
- java.lang.Object
-
- com.couchbase.transactions.config.SingleQueryTransactionConfigBuilder
-
@Uncommitted public class SingleQueryTransactionConfigBuilder extends java.lang.Object
Allows configuring a single-query-transaction.
-
-
Constructor Summary
Constructors Constructor Description SingleQueryTransactionConfigBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SingleQueryTransactionConfig
build()
static SingleQueryTransactionConfigBuilder
create()
SingleQueryTransactionConfigBuilder
durabilityLevel(TransactionDurabilityLevel durabilityLevel)
Overrides the defaultTransactionConfigBuilder.durabilityLevel(TransactionDurabilityLevel)
set, for this transaction.SingleQueryTransactionConfigBuilder
expirationTime(java.time.Duration expirationTime)
Overrides the defaultTransactionConfigBuilder.expirationTime(Duration)
set, for this transaction.SingleQueryTransactionConfigBuilder
parentSpan(com.couchbase.client.core.cnc.RequestSpan parentSpan)
Specifies the RequestSpan that's a parent for this transaction.SingleQueryTransactionConfigBuilder
queryOptions(TransactionQueryOptions queryOptions)
Sets the query configuration for this transaction.
-
-
-
Method Detail
-
create
public static SingleQueryTransactionConfigBuilder create()
-
parentSpan
public SingleQueryTransactionConfigBuilder parentSpan(com.couchbase.client.core.cnc.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.
- Returns:
- this, for chaining
-
queryOptions
public SingleQueryTransactionConfigBuilder queryOptions(TransactionQueryOptions queryOptions)
Sets the query configuration for this transaction.Any settings that are in both
queryConfig
and any configuredTransactionConfigBuilder.queryConfig(TransactionQueryConfigBuilder)
will be overridden.- Parameters:
queryOptions
- the query options to use for this transaction- Returns:
- this, for chaining
-
build
@Internal public SingleQueryTransactionConfig build()
-
expirationTime
public SingleQueryTransactionConfigBuilder expirationTime(java.time.Duration expirationTime)
Overrides the defaultTransactionConfigBuilder.expirationTime(Duration)
set, for this transaction.- Returns:
- this, for chaining
-
durabilityLevel
public SingleQueryTransactionConfigBuilder durabilityLevel(TransactionDurabilityLevel durabilityLevel)
Overrides the defaultTransactionConfigBuilder.durabilityLevel(TransactionDurabilityLevel)
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
-
-