MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::v1::events::topology_description Class Reference

#include <mongocxx/v1/events/topology_description.hpp>

Description

TopologyDescription from the SDAM Logging and Monitoring specification.

See also
Attention
This feature is experimental! It is not ready for use!

Public Member Functions

bool has_readable_server (v1::read_preference const &rp) const
 Return true when a readable server is available according to this topology description.
bool has_writable_server () const
 Return true when a writable server is available according to this topology description.
std::vector< v1::events::server_descriptionservers () const
 Return the server descriptions for all servers in this topology description.
bsoncxx::v1::stdx::string_view type () const
 Return the topology type.

Member Function Documentation

◆ has_readable_server()

bool mongocxx::v1::events::topology_description::has_readable_server ( v1::read_preference const & rp) const

Return true when a readable server is available according to this topology description.

◆ has_writable_server()

bool mongocxx::v1::events::topology_description::has_writable_server ( ) const

Return true when a writable server is available according to this topology description.

◆ servers()

std::vector< v1::events::server_description > mongocxx::v1::events::topology_description::servers ( ) const

Return the server descriptions for all servers in this topology description.

◆ type()

bsoncxx::v1::stdx::string_view mongocxx::v1::events::topology_description::type ( ) const

Return the topology type.

Returns
One of:
  • "ReplicaSetNoPrimary"
  • "ReplicaSetWithPrimary"
  • "Sharded"
  • "Single"
  • "Unknown"

The documentation for this class was generated from the following file: