Class TransactionsConfig
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionsConfig.Builder
builder()
static TransactionsConfig.Builder
Deprecated.static TransactionsConfig.Builder
durabilityLevel
(DurabilityLevel level) Deprecated.Instead of creating a new builder, please useClusterEnvironment.Builder.transactionsConfig(Consumer)
and configure the builder passed to the consumer.static TransactionsConfig.Builder
metadataCollection
(TransactionKeyspace collection) Deprecated.Instead of creating a new builder, please useClusterEnvironment.Builder.transactionsConfig(Consumer)
and configure the builder passed to the consumer.static TransactionsConfig.Builder
queryConfig
(TransactionsQueryConfig.Builder queryConfig) Deprecated.Instead of creating a new builder, please useTransactionsConfig.Builder.queryConfig(Consumer)
and configure the builder passed to the consumer.static TransactionsConfig.Builder
Deprecated.Instead of creating a new builder, please useClusterEnvironment.Builder.transactionsConfig(Consumer)
and configure the builder passed to the consumer.
-
Constructor Details
-
TransactionsConfig
public TransactionsConfig()
-
-
Method Details
-
builder
-
cleanupConfig
@Deprecated public static TransactionsConfig.Builder cleanupConfig(TransactionsCleanupConfig.Builder config) Deprecated.Instead of creating a new builder, please useClusterEnvironment.Builder.transactionsConfig(Consumer)
and configure the builder passed to the consumer.Configures transaction cleanup. -
timeout
Deprecated.Instead of creating a new builder, please useClusterEnvironment.Builder.transactionsConfig(Consumer)
and configure the builder passed to the consumer.Sets the maximum time that transactions can run for. The default is 15 seconds. After this time, the transaction will abort. Note that this could be mid-commit, in which case the cleanup process will complete the transaction asynchronously at a later point.Applications can increase or decrease this as desired. The trade-off to understand is that documents that are being mutated in a transaction A, are effectively locked from being updated by other transactions until transaction A has completed - committed or rolled back. If transaction A is unable to complete for whatever reason, the document can be locked for this
timeout
time. -
durabilityLevel
Deprecated.Instead of creating a new builder, please useClusterEnvironment.Builder.transactionsConfig(Consumer)
and configure the builder passed to the consumer.All transaction writes will be performed with this durability setting.The default setting is DurabilityLevel.MAJORITY, meaning a transaction will pause on each write until it is available in-memory on a majority of configured replicas.
DurabilityLevel.NONE is not supported and provides no ACID transactional guarantees.
-
metadataCollection
@Deprecated public static TransactionsConfig.Builder metadataCollection(TransactionKeyspace collection) Deprecated.Instead of creating a new builder, please useClusterEnvironment.Builder.transactionsConfig(Consumer)
and configure the builder passed to the consumer.Allows setting a custom collection to use for any transactional metadata documents.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.
This collection will be added to the set of collections being cleaned up.
-
queryConfig
@Deprecated public static TransactionsConfig.Builder queryConfig(TransactionsQueryConfig.Builder queryConfig) Deprecated.Instead of creating a new builder, please useTransactionsConfig.Builder.queryConfig(Consumer)
and configure the builder passed to the consumer.Sets the default query configuration for all transactions.- Parameters:
queryConfig
- the query configuration to use- Returns:
- this, for chaining
-
ClusterEnvironment.Builder.transactionsConfig(Consumer)
and configure the builder passed to the consumer.