public class TransactionsCleanupConfig extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TransactionsCleanupConfig.Builder |
Constructor and Description |
---|
TransactionsCleanupConfig() |
Modifier and Type | Method and Description |
---|---|
static TransactionsCleanupConfig.Builder |
addCollection(TransactionKeyspace collection)
Adds a collection to the set of metadata collections that will be cleaned up automatically.
|
TransactionsCleanupConfig.Builder |
addCollections(Collection<TransactionKeyspace> collections)
Adds collections to the set of metadata collections that will be cleaned up automatically.
|
static TransactionsCleanupConfig.Builder |
builder() |
static TransactionsCleanupConfig.Builder |
cleanupClientAttempts(boolean cleanupClientAttempts)
Controls where a background thread is created to cleanup any transaction attempts made by this client.
|
static TransactionsCleanupConfig.Builder |
cleanupLostAttempts(boolean cleanupLostAttempts)
Controls where a background process is created to cleanup any 'lost' transaction attempts.
|
static TransactionsCleanupConfig.Builder |
cleanupWindow(Duration cleanupWindow)
Part of the lost attempts background cleanup process.
|
public static TransactionsCleanupConfig.Builder builder()
public static TransactionsCleanupConfig.Builder cleanupClientAttempts(boolean cleanupClientAttempts)
The default is true and users should generally not change this: cleanup is an essential part of Couchbase transactions.
public static TransactionsCleanupConfig.Builder cleanupLostAttempts(boolean cleanupLostAttempts)
The default is true and users should generally not change this: cleanup is an essential part of Couchbase transactions.
public static TransactionsCleanupConfig.Builder cleanupWindow(Duration cleanupWindow)
The default setting of 60 seconds is tuned to balance how quickly such transactions are discovered, while minimising impact on the cluster. If the application would prefer to discover lost transactions more swiftly, but at the cost of increased impact, it can feel free to reduce this parameter.
public static TransactionsCleanupConfig.Builder addCollection(TransactionKeyspace collection)
This will also start cleanup immediately rather than on the first transaction (unless cleanup has been explicitly disabled.)
public TransactionsCleanupConfig.Builder addCollections(Collection<TransactionKeyspace> collections)
Collections will be added automatically to this 'cleanup set' as transactions are performed, so generally an application will not need to change this.
Setting this parameter will also start cleanup immediately rather than on the first transaction.
Copyright © 2024 Couchbase, Inc.. All rights reserved.