38class topology_description {
45 using container = std::vector<server_description>;
105 container _container;
110 explicit topology_description(
void* event);
117 topology_description(topology_description&&) = default;
118 topology_description& operator=(topology_description&&) = default;
120 topology_description(topology_description const&) = default;
121 topology_description& operator=(topology_description const&) = default;
38class topology_description {
…};
170#include <mongocxx/config/postlude.hpp>
server_descriptions(server_descriptions &&) noexcept
Move constructs a server_descriptions array.
An array of server_description instances.
Definition topology_description.hpp:43
iterator end() noexcept
Returns an iterator to the end.
iterator begin() noexcept
Returns an iterator to the beginning.
server_descriptions(server_descriptions &&) noexcept
Move constructs a server_descriptions array.
container::iterator iterator
The array's iterator type.
Definition topology_description.hpp:69
container::const_iterator const_iterator
The array's const iterator type.
Definition topology_description.hpp:74
std::size_t size() const noexcept
The number of server_description instances in the array.
bool has_readable_server(mongocxx::v_noabi::read_preference const &pref) const
Determines if the topology has a readable server available. Servers are filtered by the given read pr...
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.
Describes how MongoDB clients route read operations to the members of a replica set or sharded cluste...
Definition read_preference.hpp:49
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities describing APM events.
Declares entities whose ABI stability is NOT guaranteed.
The top-level namespace within which all mongocxx library entities are declared.
Provides mongocxx::v_noabi::read_preference.
Provides mongocxx::v_noabi::events::server_description.
Declares mongocxx::v_noabi::events::topology_description.
Provides std::string_view-related polyfills for library API usage.