19 #include <mongocxx/events/topology_description-fwd.hpp>
21 #include <bsoncxx/stdx/string_view.hpp>
22 #include <mongocxx/events/server_description.hpp>
23 #include <mongocxx/read_preference.hpp>
25 #include <mongocxx/config/prelude.hpp>
44 using container = std::vector<server_description>;
102 std::
size_t size() const noexcept;
110 container _container;
171 using ::mongocxx::v_noabi::events::read_preference;
176 #include <mongocxx/config/postlude.hpp>
An array of server_description instances.
Definition: topology_description.hpp:42
server_descriptions(server_descriptions &&) noexcept
Move constructs a server_descriptions array.
container::iterator iterator
The array's iterator type.
Definition: topology_description.hpp:68
container::const_iterator const_iterator
The array's const iterator type.
Definition: topology_description.hpp:73
Class representing what the driver knows about a topology of MongoDB servers: either a standalone,...
Definition: topology_description.hpp:37
bool has_readable_server(const mongocxx::v_noabi::read_preference &pref) const
Determines if the topology has a readable server available.
bool has_writable_server() const
Determines if the topology has a writable server available, such as a primary, mongos,...
bsoncxx::v_noabi::stdx::string_view type() const
The topology type: "Unknown", "Sharded", "ReplicaSetNoPrimary", "ReplicaSetWithPrimary",...
server_descriptions servers() const
Fetches descriptions for all known servers in the topology.
Class representing a preference for how the driver routes read operations to members of a replica set...
Definition: read_preference.hpp:63
The top-level namespace for bsoncxx library entities.
Definition: element-fwd.hpp:19
The top-level namespace for mongocxx library entities.
Definition: bulk_write-fwd.hpp:19