CAS is a special type that represented in protocol using unsigned 64-bit integer, but only equality checks allowed.
More...
#include <couchbase/cas.hxx>
|
| cas ()=default |
| Constructs empty CAS value.
|
|
| cas (std::uint64_t value) |
| Constructs CAS value using its integer representation that typically comes from protocol level.
|
|
auto | operator== (const cas &other) const -> bool |
| Checks if CAS instances represent the same value.
|
|
auto | operator!= (const cas &other) const -> bool |
| Checks if CAS instances represent the same value.
|
|
auto | empty () const -> bool |
| Checks if CAS contains meaningful value.
|
|
auto | value () const -> std::uint64_t |
| Returns internal representation of the CAS value.
|
|
CAS is a special type that represented in protocol using unsigned 64-bit integer, but only equality checks allowed.
The user should not interpret the integer value of the CAS.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
- Examples
- distributed_mutex.cxx.
◆ cas() [1/2]
Constructs empty CAS value.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ cas() [2/2]
cas |
( |
std::uint64_t | value | ) |
|
|
inlineexplicit |
Constructs CAS value using its integer representation that typically comes from protocol level.
- Parameters
-
value | numeric CAS representation |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ empty()
auto empty |
( |
| ) |
const -> bool
|
|
inlinenodiscard |
Checks if CAS contains meaningful value.
- Returns
- true if CAS is empty
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ operator!=()
auto operator!= |
( |
const cas & | other | ) |
const -> bool
|
|
inline |
Checks if CAS instances represent the same value.
- Parameters
-
- Returns
- true if CAS values don't represent the same value
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ operator==()
auto operator== |
( |
const cas & | other | ) |
const -> bool
|
|
inline |
Checks if CAS instances represent the same value.
- Parameters
-
- Returns
- true if CAS values represent the same value
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ value()
auto value |
( |
| ) |
const -> std::uint64_t
|
|
inlinenodiscard |
Returns internal representation of the CAS value.
- Returns
- raw CAS value
- Since
- 1.0.0
- Internal
- Internal interface
The documentation for this class was generated from the following file: