Couchbase C++ SDK 1.0.2 (rev. 51f4775)
|
Configuration parameters for the background transaction cleanup threads. More...
#include <couchbase/transactions/transactions_cleanup_config.hxx>
Public Member Functions | |
auto | cleanup_lost_attempts (bool value) -> transactions_cleanup_config & |
Enable/disable the lost attempts cleanup loop. | |
auto | cleanup_lost_attempts () const -> bool |
Get lost attempts cleanup loop status. | |
auto | cleanup_client_attempts (bool value) -> transactions_cleanup_config & |
Set state for the client attempts cleanup loop. | |
auto | cleanup_client_attempts () const -> bool |
Get state of client attempts cleanup loop. | |
auto | cleanup_window () const -> std::chrono::milliseconds |
Get cleanup window. | |
template<typename T > | |
auto | cleanup_window (T duration) -> transactions_cleanup_config & |
Set cleanup window. | |
auto | add_collection (const couchbase::transactions::transaction_keyspace &keyspace) -> transactions_cleanup_config & |
Add a collection to be cleaned. | |
Configuration parameters for the background transaction cleanup threads.
|
inline |
Add a collection to be cleaned.
This can be called multiple times, to add several collections, if needed.
|
inlinenodiscard |
Get state of client attempts cleanup loop.
A transactions object will create a background thread to do any cleanup necessary for the transactions it has attempted. This can be disabled if set to false.
|
inline |
Set state for the client attempts cleanup loop.
value | If true, run the cleanup client attempts loop. |
|
inlinenodiscard |
Get lost attempts cleanup loop status.
|
inline |
Enable/disable the lost attempts cleanup loop.
value | If false, do not start the lost attempts cleanup threads. |
|
inlinenodiscard |
Get cleanup window.
Each transactions instance has background threads which looks for evidence of transactions that somehow were not cleaned up during ordinary processing. There is one of these per bucket. The thread looks through the active transaction records on that bucket once during each window. There are potentially 1024 of these records, so over one cleanup window period, the thread will look for all 1024 of these, and examine any it finds. Note you can disable this by setting cleanup_lost_attempts() false.
|
inline |
Set cleanup window.
duration | An std::chrono::duration representing the cleanup window duration. |