22#include <bsoncxx/array/view_or_value.hpp>
23#include <bsoncxx/document/view_or_value.hpp>
24#include <bsoncxx/stdx/optional.hpp>
25#include <mongocxx/options/transaction.hpp>
26#include <mongocxx/stdx.hpp>
28#include <mongocxx/config/prelude.hpp>
31MONGOCXX_INLINE_NAMESPACE_BEGIN
39class topology_description;
95 k_secondary_preferred,
215 stdx::optional<
bsoncxx::document::view> tags() const;
254 stdx::optional<std::chrono::seconds> max_staleness() const;
281 const stdx::optional<
bsoncxx::document::view> hedge() const;
288 friend
mongocxx::options::transaction;
290 friend
mongocxx::events::topology_description;
308 class MONGOCXX_PRIVATE impl;
310 MONGOCXX_PRIVATE
read_preference(std::unique_ptr<impl>&& implementation);
312 std::unique_ptr<impl> _impl;
315MONGOCXX_INLINE_NAMESPACE_END
318#include <mongocxx/config/postlude.hpp>
Class representing a client connection to MongoDB.
Definition client.hpp:58
Class representing server side document groupings within a MongoDB database.
Definition collection.hpp:83
Class representing a MongoDB database.
Definition database.hpp:43
Class representing a preference for how the driver routes read operations to members of a replica set...
Definition read_preference.hpp:63
read_mode
Determines which members in a replica set are acceptable to read from.
Definition read_preference.hpp:76
read_preference(read_mode mode, bsoncxx::document::view_or_value tags)
Constructs a new read_preference with tags.
read_preference(read_mode mode)
Constructs a new read_preference.
read_preference()
Constructs a new read_preference with read_mode set to k_primary.
read_preference(read_preference &&) noexcept
Move constructs a read_preference.
read_preference(const read_preference &)
Copy constructs a read_preference.
read_preference & operator=(const read_preference &)
Copy assigns a read_preference.
Class representing a MongoDB connection string URI.
Definition uri.hpp:43
Top level namespace for MongoDB C++ BSON functionality.
Definition element.hpp:24
Top level namespace for the MongoDB C++ driver.
Definition bulk_write.hpp:24
Definition read_preference.hpp:108