Class TransactionCleanupConfigBuilder
Inherited Members
Namespace: Couchbase.Client.Transactions.Config
Assembly: Couchbase.NetClient.dll
Syntax
public class TransactionCleanupConfigBuilder
Methods
| Edit this page View SourceAddCollection(Keyspace)
Add a collection to be cleaned of lost/abandoned transactions by this or other transaction clients
Declaration
public TransactionCleanupConfigBuilder AddCollection(Keyspace keyspace)
Parameters
Type | Name | Description |
---|---|---|
Keyspace | keyspace |
Returns
Type | Description |
---|---|
Transaction |
Build()
Generate a Transaction
Declaration
public TransactionCleanupConfig Build()
Returns
Type | Description |
---|---|
Transaction |
A Transaction |
CleanupClientAttempts(bool)
Controls where any transaction attempts made by this client are automatically removed.
Declaration
public TransactionCleanupConfigBuilder CleanupClientAttempts(bool cleanupClientAttempts)
Parameters
Type | Name | Description |
---|---|---|
bool | cleanupClientAttempts | Whether to clean up attempts made by this client. |
Returns
Type | Description |
---|---|
Transaction |
The builder. |
CleanupLostAttempts(bool)
Controls where a background process is created to clean up any 'lost' transaction attempts.
Declaration
public TransactionCleanupConfigBuilder CleanupLostAttempts(bool cleanupLostAttempts)
Parameters
Type | Name | Description |
---|---|---|
bool | cleanupLostAttempts | Whether to clean up lost attempts from other clients. |
Returns
Type | Description |
---|---|
Transaction |
The builder. |
CleanupWindow(TimeSpan)
Each client that has cleanupLostAttempts(true) enabled, will be participating in the distributed cleanup process. This involves checking all ATRs every cleanup window, and this parameter controls the length of that window.
Declaration
public TransactionCleanupConfigBuilder CleanupWindow(TimeSpan cleanupWindow)
Parameters
Type | Name | Description |
---|---|---|
Time |
cleanupWindow | The length of the cleanup window. |
Returns
Type | Description |
---|---|
Transaction |
The builder. |
Create()
Create an instance of the config.
Declaration
public static TransactionCleanupConfigBuilder Create()
Returns
Type | Description |
---|---|
Transaction |
An instance of the Transaction |