31struct attempt_context_testing_hooks;
34struct cleanup_testing_hooks;
90 [[nodiscard]]
auto timeout() const -> std::chrono::nanoseconds
103 timeout_ = std::chrono::duration_cast<std::chrono::nanoseconds>(duration);
116 metadata_collection_ = keyspace;
123 return metadata_collection_;
133 return query_config_;
143 return query_config_;
154 query_config_ = config;
165 return cleanup_config_;
175 return cleanup_config_;
191 auto test_factories(std::shared_ptr<core::transactions::attempt_context_testing_hooks> hooks,
192 std::shared_ptr<core::transactions::cleanup_testing_hooks> cleanup_hooks)
195 attempt_context_hooks_ = hooks;
196 cleanup_hooks_ = cleanup_hooks;
201 [[nodiscard]]
auto attempt_context_hooks() const
202 -> core::transactions::attempt_context_testing_hooks&
204 return *attempt_context_hooks_;
208 [[nodiscard]]
auto cleanup_hooks() const -> core::transactions::cleanup_testing_hooks&
210 return *cleanup_hooks_;
216 std::chrono::nanoseconds timeout;
217 std::shared_ptr<core::transactions::attempt_context_testing_hooks> attempt_context_hooks;
218 std::shared_ptr<core::transactions::cleanup_testing_hooks> cleanup_hooks;
219 std::optional<couchbase::transactions::transaction_keyspace> metadata_collection;
220 transactions_query_config::built query_config;
221 transactions_cleanup_config::built cleanup_config;
225 [[nodiscard]]
auto build() const -> built;
229 std::chrono::nanoseconds timeout_{ std::chrono::seconds(15) };
230 std::shared_ptr<core::transactions::attempt_context_testing_hooks> attempt_context_hooks_;
231 std::shared_ptr<core::transactions::cleanup_testing_hooks> cleanup_hooks_;
232 std::optional<couchbase::transactions::transaction_keyspace> metadata_collection_;
233 transactions_query_config query_config_{};
234 transactions_cleanup_config cleanup_config_{};
Configuration parameters for the background transaction cleanup threads.
Definition transactions_cleanup_config.hxx:29
Configuration parameters for transactions.
Definition transactions_config.hxx:43
auto query_config() const -> const transactions_query_config &
Get the query config values.
Definition transactions_config.hxx:131
auto cleanup_config() const -> const transactions_cleanup_config &
Get the cleanup configuration for transactions.
Definition transactions_config.hxx:163
transactions_config(transactions_config &&c) noexcept
auto metadata_collection() const -> std::optional< couchbase::transactions::transaction_keyspace >
Definition transactions_config.hxx:120
auto metadata_collection(const couchbase::transactions::transaction_keyspace &keyspace) -> transactions_config &
Set the transaction's metadata collection.
Definition transactions_config.hxx:113
auto operator=(const transactions_config &c) -> transactions_config &
auto timeout(T duration) -> transactions_config &
Set the timeout for transactions.
Definition transactions_config.hxx:101
auto durability_level(enum couchbase::durability_level level) -> transactions_config &
Set the default durability level for all transaction operations.
Definition transactions_config.hxx:75
auto build() const -> built
auto query_config(const transactions_query_config &config) -> transactions_config &
Set the query configuration for transactions.
Definition transactions_config.hxx:152
transactions_config(const transactions_config &c)
auto cleanup_config() -> transactions_cleanup_config &
Get the cleanup configuration for transactions.
Definition transactions_config.hxx:173
auto cleanup_config(const transactions_cleanup_config &cleanup_config) -> transactions_config &
Set the cleanup configuration.
Definition transactions_config.hxx:184
auto durability_level() const -> couchbase::durability_level
Get the default durability level for all transaction operations.
Definition transactions_config.hxx:62
auto query_config() -> transactions_query_config &
Get the query config values.
Definition transactions_config.hxx:141
auto timeout() const -> std::chrono::nanoseconds
Get the timeout for transactions.
Definition transactions_config.hxx:90
The transactions_query_config sets the defaults for all queries in the transactions.
Definition transactions_query_config.hxx:26
The transactions object is used to initiate a transaction.
Definition transactions.hxx:39
Definition transaction_get_result.hxx:27
Definition transactions.hxx:28
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28
durability_level
Specifies enhanced durability options for the mutation.
Definition durability_level.hxx:30
@ majority
The mutation must be replicated to a majority of the Data Service nodes (that is, held in the memory ...
Offline, serializable representation of a bucket, scope, and collection.
Definition transaction_keyspace.hxx:25