Class TransactionsCleanupConfig
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCollection
(TransactionKeyspace collection) Adds a collection to the set of metadata collections that will be cleaned up automatically.addCollections
(Collection<TransactionKeyspace> collections) Adds collections to the set of metadata collections that will be cleaned up automatically.builder()
cleanupClientAttempts
(boolean cleanupClientAttempts) Controls where a background thread is created to cleanup any transaction attempts made by this client.cleanupLostAttempts
(boolean cleanupLostAttempts) Controls where a background process is created to cleanup any 'lost' transaction attempts.cleanupWindow
(Duration cleanupWindow) Part of the lost attempts background cleanup process.
-
Constructor Details
-
TransactionsCleanupConfig
public TransactionsCleanupConfig()
-
-
Method Details
-
builder
-
cleanupClientAttempts
public static TransactionsCleanupConfig.Builder cleanupClientAttempts(boolean cleanupClientAttempts) Controls where a background thread is created to cleanup any transaction attempts made by this client.The default is true and users should generally not change this: cleanup is an essential part of Couchbase transactions.
-
cleanupLostAttempts
Controls where a background process is created to cleanup any 'lost' transaction attempts.The default is true and users should generally not change this: cleanup is an essential part of Couchbase transactions.
-
cleanupWindow
Part of the lost attempts background cleanup process. Specifies the window during which the cleanup process is sure to discover all lost transactions.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.
-
addCollection
Adds a collection to the set of metadata collections that will be cleaned up automatically.This will also start cleanup immediately rather than on the first transaction (unless cleanup has been explicitly disabled.)
-
addCollections
public TransactionsCleanupConfig.Builder addCollections(Collection<TransactionKeyspace> collections) Adds collections to the set of metadata collections that will be cleaned up automatically.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.
-