Write concern.
More...
#include <userver/storages/mongo/options.hpp>
|
| WriteConcern (Level level) |
| Creates a write concern with the special level.
|
|
| WriteConcern (size_t nodes_count) |
| Creates a write concern waiting for propagation to nodes_count RS nodes.
|
|
| WriteConcern (std::string tag) |
| Creates a write concern defined in RS config.
|
|
bool | IsMajority () const |
|
size_t | NodesCount () const |
|
const std::string & | Tag () const |
|
std::optional< bool > | Journal () const |
|
const std::chrono::milliseconds & | Timeout () const |
|
WriteConcern & | SetTimeout (std::chrono::milliseconds timeout) |
| Sets write concern timeout, 0 means no timeout.
|
|
WriteConcern & | SetJournal (bool value) |
| Sets whether to wait for on-disk journal commit.
|
|
◆ Level
Enumerator |
---|
kMajority | Wait until propagation to a "majority" of RS nodes.
|
kUnacknowledged | Do not check for operation errors, do not wait for write, same as 0
|
Definition at line 81 of file options.hpp.
◆ kDefaultMajorityTimeout
constexpr std::chrono::seconds storages::mongo::options::WriteConcern::kDefaultMajorityTimeout {1} |
|
staticconstexpr |
Default timeout for "majority" write concern.
Definition at line 89 of file options.hpp.
The documentation for this class was generated from the following file: