MongoDB C++ Driver
mongocxx-3.3.0
|
Class representing the optional arguments to mongocxx::client::start_session. More...
#include <client_session.hpp>
Public Member Functions | |
client_session & | causal_consistency (bool causal_consistency) noexcept |
Sets the causal_consistency option. More... | |
bool | causal_consistency () const noexcept |
Gets the current value of the causal_consistency option. | |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const client_session &, const client_session &) |
Compare session options for equality. | |
bool | operator!= (const client_session &, const client_session &) |
Compare session options for inequality. | |
bool | operator== (const client_session &, const client_session &) |
Compare session options for equality. | |
bool | operator!= (const client_session &, const client_session &) |
Compare session options for inequality. | |
Class representing the optional arguments to mongocxx::client::start_session.
|
noexcept |
Sets the causal_consistency option.
If true (the default), each operation in the session will be causally ordered after the previous read or write operation. Set to false to disable causal consistency.
Unacknowledged writes are not causally consistent. If you execute a write operation with an unacknowledged write concern (a mongocxx::write_concern with mongocxx::write_concern::acknowledge_level of k_unacknowledged
), the write does not participate in causal consistency.