21 #include "mongo/client/export_macros.h"
45 static const char kMajority[];
75 int32_t nodes()
const;
84 const std::string& mode()
const;
108 int32_t timeout()
const;
131 bool requiresConfirmation()
const;
134 bool hasMode()
const;
141 static const size_t kNumOptions = 5;
142 enum Options { kW, kWStr, kJ, kFsync, kTimeout };
143 std::bitset<kNumOptions> _enabled;
static const WriteConcern journaled
A single node acknowledges the write operation was committed to journal.
Definition: write_concern.h:59
static const WriteConcern unacknowledged
Fire and forget.
Definition: write_concern.h:53
static const WriteConcern acknowledged
A single node acknowledges the write, equivalent to default constructor.
Definition: write_concern.h:56
static const WriteConcern replicated
Two nodes have acknowledged receipt of the write operation.
Definition: write_concern.h:62
A StringData object wraps a 'const string&' or a 'const char*' without copying its contents...
Definition: string_data.h:43
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
static const WriteConcern majority
A majority of nodes acknowledges (replica set)
Definition: write_concern.h:65
Class to encapsulate client side "Write Concern" concept.
Definition: write_concern.h:35
C++ representation of a "BSON" object – that is, an extended JSON-style object in a binary represent...
Definition: bsonobj.h:78