40 cleanup_lost_attempts_ = value;
51 return cleanup_lost_attempts_;
63 cleanup_client_attempts_ = value;
77 return cleanup_client_attempts_;
94 return cleanup_window_;
107 cleanup_window_ = std::chrono::duration_cast<std::chrono::milliseconds>(duration);
120 collections_.emplace_back(keyspace);
126 bool cleanup_lost_attempts;
127 bool cleanup_client_attempts;
128 std::chrono::milliseconds cleanup_window;
129 std::list<couchbase::transactions::transaction_keyspace> collections;
133 [[nodiscard]]
auto build() const -> built
135 return { cleanup_lost_attempts_, cleanup_client_attempts_, cleanup_window_, collections_ };
139 bool cleanup_lost_attempts_{
true };
140 bool cleanup_client_attempts_{
true };
141 std::chrono::milliseconds cleanup_window_{ std::chrono::seconds(60) };
142 std::list<couchbase::transactions::transaction_keyspace> collections_{};
Configuration parameters for the background transaction cleanup threads.
Definition transactions_cleanup_config.hxx:29
auto add_collection(const couchbase::transactions::transaction_keyspace &keyspace) -> transactions_cleanup_config &
Add a collection to be cleaned.
Definition transactions_cleanup_config.hxx:117
auto cleanup_window() const -> std::chrono::milliseconds
Get cleanup window.
Definition transactions_cleanup_config.hxx:92
auto cleanup_client_attempts() const -> bool
Get state of client attempts cleanup loop.
Definition transactions_cleanup_config.hxx:75
auto cleanup_client_attempts(bool value) -> transactions_cleanup_config &
Set state for the client attempts cleanup loop.
Definition transactions_cleanup_config.hxx:61
auto cleanup_lost_attempts(bool value) -> transactions_cleanup_config &
Enable/disable the lost attempts cleanup loop.
Definition transactions_cleanup_config.hxx:38
auto cleanup_window(T duration) -> transactions_cleanup_config &
Set cleanup window.
Definition transactions_cleanup_config.hxx:105
auto cleanup_lost_attempts() const -> bool
Get lost attempts cleanup loop status.
Definition transactions_cleanup_config.hxx:49
Definition transactions.hxx:28
Offline, serializable representation of a bucket, scope, and collection.
Definition transaction_keyspace.hxx:25