Common options that used by most operations.
More...
#include <couchbase/common_durability_options.hxx>
|
| struct | built |
| | Immutable value object representing consistent options. More...
|
template<typename derived_class>
class couchbase::common_durability_options< derived_class >
Common options that used by most operations.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ build_common_durability_options()
template<typename derived_class>
| auto build_common_durability_options |
( |
| ) |
const -> built |
|
inlinenodiscardprotected |
- Returns
- immutable representation of the common options
- Since
- 1.0.0
- Internal
- Internal interface
◆ durability() [1/2]
template<typename derived_class>
Allows to customize the enhanced durability requirements for this operation.
- Note
- if a
durability(persist_to, replicate_to) has been set beforehand it will be set back to persist_to::none and replicate_to::none, since it is not allowed to use both mechanisms at the same time.
- Parameters
-
| level | the enhanced durability requirement. |
- Returns
- this options builder for chaining purposes.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ durability() [2/2]
template<typename derived_class>
Allows to customize the poll-based durability requirements for this operation.
- Note
- if a
durability(durability_level) has been set beforehand it will be set back to durability_level::none, since it is not allowed to use both mechanisms at the same time.
-
Not served over the couchbase2 transport, and not refused before the mutation is applied: observing persistence and replication needs per-node connections that transport does not open, so the mutation is sent to the gateway and applied and only the polling that follows fails. The document is already written when the error arrives, and that error comes from the failed poll rather than being feature_not_available. Level-based durability, set by
durability(durability_level), is served normally and is the durability to use over that transport.
- Parameters
-
| persist_to_nodes | the durability persistence requirement. |
| replicate_to_nodes | the durability replication requirement. |
- Returns
- this options builder for chaining purposes.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
- Since
- 1.4.0 – Cloud Native Gateway (CNG, couchbase2://) support
- Uncommitted
- Cloud Native Gateway (CNG, couchbase2://) support is uncommitted and may change in a future release, independently of the stability of the API it applies to
The documentation for this class was generated from the following file: