MongoDB C++ Driver  mongocxx-3.7.0
Public Member Functions | List of all members
mongocxx::events::server_changed_event Class Reference

An event notification sent when the driver observes a change in the status of a server it is connected to. More...

#include <server_changed_event.hpp>

Public Member Functions

 ~server_changed_event ()
 Destroys a server_changed_event.
 
bsoncxx::stdx::string_view host () const
 Returns the server host name. More...
 
std::uint16_t port () const
 Returns the server port. More...
 
const bsoncxx::oid topology_id () const
 An opaque id, unique to this topology for this mongocxx::client or mongocxx::pool. More...
 
const server_description previous_description () const
 The server's description before it changed. More...
 
const server_description new_description () const
 The server's description after it changed. More...
 

Detailed Description

An event notification sent when the driver observes a change in the status of a server it is connected to.

See also
"ServerDescriptionChangedEvent" in https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst

Member Function Documentation

◆ host()

bsoncxx::stdx::string_view mongocxx::events::server_changed_event::host ( ) const

Returns the server host name.

Returns
The host name.

◆ new_description()

const server_description mongocxx::events::server_changed_event::new_description ( ) const

The server's description after it changed.

Returns
The server_description.

◆ port()

std::uint16_t mongocxx::events::server_changed_event::port ( ) const

Returns the server port.

Returns
The port.

◆ previous_description()

const server_description mongocxx::events::server_changed_event::previous_description ( ) const

The server's description before it changed.

Returns
The server_description.

◆ topology_id()

const bsoncxx::oid mongocxx::events::server_changed_event::topology_id ( ) const

An opaque id, unique to this topology for this mongocxx::client or mongocxx::pool.

Returns
The id.

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