22 #include <bsoncxx/document/view_or_value.hpp> 23 #include <bsoncxx/stdx/optional.hpp> 24 #include <mongocxx/options/transaction.hpp> 25 #include <mongocxx/stdx.hpp> 27 #include <mongocxx/config/prelude.hpp> 30 MONGOCXX_INLINE_NAMESPACE_BEGIN
38 class topology_description;
94 k_secondary_preferred,
138 read_preference(
const read_preference&);
143 read_preference& operator=(
const read_preference&);
148 read_preference(read_preference&&) noexcept;
153 read_preference& operator=(read_preference&&) noexcept;
200 stdx::optional<bsoncxx::document::view> tags()
const;
232 read_preference& max_staleness(std::chrono::seconds max_staleness);
239 stdx::optional<std::chrono::seconds> max_staleness()
const;
256 friend MONGOCXX_API
bool MONGOCXX_CALL operator==(
const read_preference&,
257 const read_preference&);
258 friend MONGOCXX_API
bool MONGOCXX_CALL operator!=(
const read_preference&,
259 const read_preference&);
264 class MONGOCXX_PRIVATE impl;
266 MONGOCXX_PRIVATE read_preference(std::unique_ptr<impl>&& implementation);
268 std::unique_ptr<impl> _impl;
271 MONGOCXX_INLINE_NAMESPACE_END
274 #include <mongocxx/config/postlude.hpp> Class representing a MongoDB connection string URI.
Definition: uri.hpp:40
Class representing the optional arguments for a transaction.
Definition: transaction.hpp:38
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24
Class representing a client connection to MongoDB.
Definition: client.hpp:57
Definition: read_preference.hpp:107
Class representing a MongoDB database.
Definition: database.hpp:43
Class representing what the driver knows about a topology of MongoDB servers: either a standalone...
Definition: topology_description.hpp:37
Class representing a preference for how the driver routes read operations to members of a replica set...
Definition: read_preference.hpp:62
read_mode
Determines which members in a replica set are acceptable to read from.
Definition: read_preference.hpp:75
Class representing server side document groupings within a MongoDB database.
Definition: collection.hpp:85