Couchbase Transactions C++ Client  1.0.0
Transactions client for couchbase
Public Member Functions | List of all members
couchbase::cluster_options Class Reference

Options for cluster connections. More...

#include <cluster.hxx>

Public Member Functions

 cluster_options ()
 Default constructor for cluster_options.
 
CB_NODISCARD size_t max_instances () const
 get maximum number of libcouchbase instances for this cluster. More...
 
cluster_optionsmax_instances (size_t max)
 Set maximum number of libcouchbase instances for this cluster. More...
 
CB_NODISCARD size_t max_bucket_instances () const
 get maximum number of libcouchbase instances for this cluster. More...
 
cluster_optionsmax_bucket_instances (size_t max)
 Set maximum number of libcouchbase instances for all buckets created from this cluster. More...
 
CB_NODISCARD boost::optional< std::chrono::microseconds > kv_timeout () const
 Default kv timeout. More...
 
template<typename T >
cluster_optionskv_timeout (T duration)
 Set default kv timeout. More...
 
CB_NODISCARD instance_pool_event_counter * event_counter () const
 Internal structure used for tests. More...
 
cluster_optionsevent_counter (instance_pool_event_counter *counter)
 Internal structure used for tests. More...
 

Detailed Description

Options for cluster connections.

Member Function Documentation

◆ event_counter() [1/2]

CB_NODISCARD instance_pool_event_counter* couchbase::cluster_options::event_counter ( ) const
inline

Internal structure used for tests.

Stability
Volatile:

◆ event_counter() [2/2]

cluster_options& couchbase::cluster_options::event_counter ( instance_pool_event_counter *  counter)
inline

Internal structure used for tests.

Stability
Volatile:

◆ kv_timeout() [1/2]

CB_NODISCARD boost::optional<std::chrono::microseconds> couchbase::cluster_options::kv_timeout ( ) const
inline

Default kv timeout.

This is the default kv timeout to use for any kv operation within the cluster if it has not been specified in the options for that operation.

Returns
The duration this cluster is using, if it was set.

◆ kv_timeout() [2/2]

template<typename T >
cluster_options& couchbase::cluster_options::kv_timeout ( duration)
inline

Set default kv timeout.

Sets the kv timeout to use for any kv operation within the cluster if it has not been specified in the options for that operation. The result will indicate that the operation timed out, see result.is_timeout().

Parameters
durationThe desired duration to use.

◆ max_bucket_instances() [1/2]

CB_NODISCARD size_t couchbase::cluster_options::max_bucket_instances ( ) const
inline

get maximum number of libcouchbase instances for this cluster.

The instances are created lazily - only when there is thread contention over them will more be created, up to this max. When none are available, operations will block until one becomes available.

Returns
maximum number of libcouchbase instances to create for any bucket created from this cluster.

◆ max_bucket_instances() [2/2]

cluster_options& couchbase::cluster_options::max_bucket_instances ( size_t  max)
inline

Set maximum number of libcouchbase instances for all buckets created from this cluster.

Returns
reference to this options object, so the calls can be chained.

◆ max_instances() [1/2]

CB_NODISCARD size_t couchbase::cluster_options::max_instances ( ) const
inline

get maximum number of libcouchbase instances for this cluster.

The instances are created lazily - only when there is thread contention over them will more be created, up to this max. When none are available, operations will block until one becomes available.

Returns
maximum number of libcouchbase instances to create for this cluster

◆ max_instances() [2/2]

cluster_options& couchbase::cluster_options::max_instances ( size_t  max)
inline

Set maximum number of libcouchbase instances for this cluster.

Returns
reference to this options object, so the calls can be chained.

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