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>
31 MONGOCXX_INLINE_NAMESPACE_BEGIN
39 class 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;
300 friend MONGOCXX_API
bool MONGOCXX_CALL operator==(const
read_preference&,
302 friend MONGOCXX_API
bool MONGOCXX_CALL operator!=(const
read_preference&,
308 class MONGOCXX_PRIVATE impl;
310 MONGOCXX_PRIVATE
read_preference(std::unique_ptr<impl>&& implementation);
312 std::unique_ptr<impl> _impl;
315 MONGOCXX_INLINE_NAMESPACE_END
318 #include <mongocxx/config/postlude.hpp>