22 #include <bsoncxx/document/value.hpp>
23 #include <bsoncxx/stdx/optional.hpp>
24 #include <bsoncxx/stdx/string_view.hpp>
25 #include <mongocxx/options/transaction.hpp>
26 #include <mongocxx/stdx.hpp>
28 #include <mongocxx/config/prelude.hpp>
31 MONGOCXX_INLINE_NAMESPACE_BEGIN
62 enum class level { k_default, k_majority, k_tag, k_unacknowledged, k_acknowledged };
102 void journal(
bool journal);
119 void nodes(std::int32_t confirm_from);
139 void acknowledge_level(
level confirm_level);
151 void majority(std::chrono::milliseconds timeout);
162 void tag(stdx::string_view tag);
174 void timeout(std::chrono::milliseconds timeout);
181 bool journal() const;
193 stdx::optional<std::int32_t> nodes() const;
209 stdx::optional<std::
string> tag() const;
216 bool majority() const;
223 std::chrono::milliseconds timeout() const;
230 bool is_acknowledged() const;
245 friend options::transaction;
261 class MONGOCXX_PRIVATE impl;
263 MONGOCXX_PRIVATE
write_concern(std::unique_ptr<impl>&& implementation);
265 std::unique_ptr<impl> _impl;
268 MONGOCXX_INLINE_NAMESPACE_END
271 #include <mongocxx/config/postlude.hpp>