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 |
|---|---|
| TransactionCleanupConfigBuilder |
Build()
Generate a TransactionCleanupConfig from the values provided.
Declaration
public TransactionCleanupConfig Build()
Returns
| Type | Description |
|---|---|
| TransactionCleanupConfig | A TransactionCleanupConfig that has been initialized with the given values. |
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 |
|---|---|
| TransactionCleanupConfigBuilder | 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 |
|---|---|
| TransactionCleanupConfigBuilder | 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 |
|---|---|---|
| TimeSpan | cleanupWindow | The length of the cleanup window. |
Returns
| Type | Description |
|---|---|
| TransactionCleanupConfigBuilder | The builder. |
Create()
Create an instance of the config.
Declaration
public static TransactionCleanupConfigBuilder Create()
Returns
| Type | Description |
|---|---|
| TransactionCleanupConfigBuilder | An instance of the TransactionCleanupConfigBuilder. |