Couchbase C++ SDK 1.0.2 (rev. 51f4775)
Loading...
Searching...
No Matches
transactions_config Class Reference

Configuration parameters for transactions. More...

#include <couchbase/transactions/transactions_config.hxx>

Public Member Functions

 transactions_config ()
 
 ~transactions_config ()
 
 transactions_config (const transactions_config &c)
 
 transactions_config (transactions_config &&c) noexcept
 
auto operator= (const transactions_config &c) -> transactions_config &
 
auto durability_level () const -> couchbase::durability_level
 Get the default durability level for all transaction operations.
 
auto durability_level (enum couchbase::durability_level level) -> transactions_config &
 Set the default durability level for all transaction operations.
 
auto timeout () const -> std::chrono::nanoseconds
 Get the timeout for transactions.
 
template<typename T >
auto timeout (T duration) -> transactions_config &
 Set the timeout for transactions.
 
auto metadata_collection (const couchbase::transactions::transaction_keyspace &keyspace) -> transactions_config &
 Set the transaction's metadata collection.
 
auto metadata_collection () const -> std::optional< couchbase::transactions::transaction_keyspace >
 
auto query_config () const -> const transactions_query_config &
 Get the query config values.
 
auto query_config () -> transactions_query_config &
 Get the query config values.
 
auto query_config (const transactions_query_config &config) -> transactions_config &
 Set the query configuration for transactions.
 
auto cleanup_config () const -> const transactions_cleanup_config &
 Get the cleanup configuration for transactions.
 
auto cleanup_config () -> transactions_cleanup_config &
 Get the cleanup configuration for transactions.
 
auto cleanup_config (const transactions_cleanup_config &cleanup_config) -> transactions_config &
 Set the cleanup configuration.
 
auto build () const -> built
 

Detailed Description

Configuration parameters for transactions.

Constructor & Destructor Documentation

◆ transactions_config() [1/3]

◆ ~transactions_config()

◆ transactions_config() [2/3]

◆ transactions_config() [3/3]

Member Function Documentation

◆ build()

auto build ( ) const -> built
nodiscard
Internal
Internal interface

◆ cleanup_config() [1/3]

auto cleanup_config ( ) -> transactions_cleanup_config&
inlinenodiscard

Get the cleanup configuration for transactions.

Returns
The cleanup configuration.

◆ cleanup_config() [2/3]

auto cleanup_config ( ) const -> const transactions_cleanup_config&
inlinenodiscard

Get the cleanup configuration for transactions.

Returns
The cleanup configuration.

◆ cleanup_config() [3/3]

auto cleanup_config ( const transactions_cleanup_config & cleanup_config) -> transactions_config&
inline

Set the cleanup configuration.

Parameters
cleanup_configThe cleanup configuration to use.
Returns
reference to this, so calls can be chained.

◆ durability_level() [1/2]

auto durability_level ( ) const -> couchbase::durability_level
inlinenodiscard

Get the default durability level for all transaction operations.

See also
couchbase::durability_level for details.
Returns
The default durability level used for write operations.

◆ durability_level() [2/2]

Set the default durability level for all transaction operations.

See also
couchbase::durability_level for details.
Parameters
levelThe default durability level desired for write operations.
Returns
reference to this, so calls can be chained.

◆ metadata_collection() [1/2]

auto metadata_collection ( ) const -> std::optional<couchbase::transactions::transaction_keyspace>
inlinenodiscard

◆ metadata_collection() [2/2]

auto metadata_collection ( const couchbase::transactions::transaction_keyspace & keyspace) -> transactions_config&
inline

Set the transaction's metadata collection.

Parameters
keyspaceThe collection to use for the transaction metadata.
Returns
reference to this, so calls can be chained.

◆ operator=()

auto operator= ( const transactions_config & c) -> transactions_config &

◆ query_config() [1/3]

auto query_config ( ) -> transactions_query_config&
inlinenodiscard

Get the query config values.

Returns
The query configuration for transactions.

◆ query_config() [2/3]

auto query_config ( ) const -> const transactions_query_config&
inlinenodiscard

Get the query config values.

Returns
The query configuration for transactions.

◆ query_config() [3/3]

auto query_config ( const transactions_query_config & config) -> transactions_config&
inline

Set the query configuration for transactions.

Parameters
configThe transactions query configuration to use.
Returns
reference to this, so calls can be chained.

◆ timeout() [1/2]

auto timeout ( ) const -> std::chrono::nanoseconds
inlinenodiscard

Get the timeout for transactions.

Transactions can conflict (or other operations on those documents), and may retry. This is the maximum time a transaction can take, including any retries. The transaction will throw an errc::transaction::expired and rollback when this occurs.

Returns
timeout for transactions.

◆ timeout() [2/2]

template<typename T >
auto timeout ( T duration) -> transactions_config&
inline

Set the timeout for transactions.

Parameters
durationdesired expiration for transactions.
Returns
reference to this, so calls can be chained.

The documentation for this class was generated from the following file: