Couchbase C++ SDK 1.5.0 (rev. 380784c)
Loading...
Searching...
No Matches
get_replica_strategy Class Reference

Selects the replica that get_replica() reads from. More...

#include <couchbase/get_replica_strategy.hxx>

Classes

struct  built
 Immutable value object representing a consistent strategy. More...

Public Member Functions

auto build () const -> built
 Returns the strategy as an immutable value.

Static Public Member Functions

static auto from_index (replica_index index, const get_replica_strategy_from_index_options &options={}) -> get_replica_strategy
 Read from the replica at the given index.

Detailed Description

Selects the replica that get_replica() reads from.

Since
1.5.0
Committed
Generally available API and should be preferred in production

Member Function Documentation

◆ build()

auto build ( ) const -> built
inlinenodiscard

Returns the strategy as an immutable value.

Returns
the strategy as an immutable value
Since
1.5.0
Internal
Internal interface

◆ from_index()

auto from_index ( replica_index index,
const get_replica_strategy_from_index_options & options = {} ) -> get_replica_strategy
inlinestaticnodiscard

Read from the replica at the given index.

Parameters
indexthe replica to read from
optionsthe custom options
Returns
the strategy to pass to get_replica()
Since
1.5.0
Committed
Generally available API and should be preferred in production

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