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

#include <mongocxx/v1/apm.hpp>

Description

Public Member Functions

 apm ()
 Default initialization.
 apm (apm &&other) noexcept
 Move constructor.
 apm (apm const &other)
 Copy construction.
 ~apm ()
 Destroy this object.
std::function< void(v1::events::command_failed const &)> command_failed () const
 Return the current the "CommandFailedEvent" handler.
std::function< void(v1::events::command_started const &)> command_started () const
 Return the current "CommandStartedEvent" handler.
std::function< void(v1::events::command_succeeded const &)> command_succeeded () const
 Return the current the "CommandSucceededEvent" handler.
apmon_command_failed (std::function< void(v1::events::command_failed const &)> fn)
 Set the "CommandFailedEvent" handler.
apmon_command_started (std::function< void(v1::events::command_started const &)> fn)
 Set the "CommandStartedEvent" handler.
apmon_command_succeeded (std::function< void(v1::events::command_succeeded const &)> fn)
 Set the "CommandSucceededEvent" handler.
apmon_server_closed (std::function< void(v1::events::server_closed const &)> fn)
 Set the "ServerClosedEvent" handler.
apmon_server_description_changed (std::function< void(v1::events::server_description_changed const &)> fn)
 Set the "ServerDescriptionChangedEvent" handler.
apmon_server_heartbeat_failed (std::function< void(v1::events::server_heartbeat_failed const &)> fn)
 Set the "ServerHeartbeatFailedEvent" handler.
apmon_server_heartbeat_started (std::function< void(v1::events::server_heartbeat_started const &)> fn)
 Set the "ServerHeartbeatStartedEvent" handler.
apmon_server_heartbeat_succeeded (std::function< void(v1::events::server_heartbeat_succeeded const &)> fn)
 Set the "ServerHeartbeatSucceededEvent" handler.
apmon_server_opening (std::function< void(v1::events::server_opening const &)> fn)
 Set the "ServerOpeningEvent" handler.
apmon_topology_closed (std::function< void(v1::events::topology_closed const &)> fn)
 Set the "TopologyClosedEvent" handler.
apmon_topology_description_changed (std::function< void(v1::events::topology_description_changed const &)> fn)
 Set the "TopologyDescriptionChangedEvent" handler.
apmon_topology_opening (std::function< void(v1::events::topology_opening const &)> fn)
 Set the "TopologyOpeningEvent" handler.
apmoperator= (apm &&other) noexcept
 Move assignment.
apmoperator= (apm const &other)
 Copy assignment.
std::function< void(v1::events::server_closed const &)> server_closed () const
 Return the current the "ServerClosedEvent" handler.
std::function< void(v1::events::server_description_changed const &)> server_description_changed () const
 Return the current the "ServerDescriptionChangedEvent" handler.
std::function< void(v1::events::server_heartbeat_failed const &)> server_heartbeat_failed () const
 Return the current the "ServerHeartbeatFailedEvent" handler.
std::function< void(v1::events::server_heartbeat_started const &)> server_heartbeat_started () const
 Return the current the "ServerHeartbeatStartedEvent" handler.
std::function< void(v1::events::server_heartbeat_succeeded const &)> server_heartbeat_succeeded () const
 Return the current the "ServerHeartbeatSucceededEvent" handler.
std::function< void(v1::events::server_opening const &)> server_opening () const
 Return the current the "ServerOpeningEvent" handler.
std::function< void(v1::events::topology_closed const &)> topology_closed () const
 Return the current the "TopologyClosedEvent" handler.
std::function< void(v1::events::topology_description_changed const &)> topology_description_changed () const
 Return the current the "TopologyDescriptionChangedEvent" handler.
std::function< void(v1::events::topology_opening const &)> topology_opening () const
 Return the current the "TopologyOpeningEvent" handler.

Constructor & Destructor Documentation

◆ ~apm()

mongocxx::v1::apm::~apm ( )

Destroy this object.

◆ apm() [1/3]

mongocxx::v1::apm::apm ( apm && other)
noexcept

Move constructor.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ apm() [2/3]

mongocxx::v1::apm::apm ( apm const & other)

Copy construction.

◆ apm() [3/3]

mongocxx::v1::apm::apm ( )

Default initialization.

Postconditions:
  • All event handlers are initialized as "empty".

Member Function Documentation

◆ command_failed()

std::function< void(v1::events::command_failed const &)> mongocxx::v1::apm::command_failed ( ) const

Return the current the "CommandFailedEvent" handler.

◆ command_started()

std::function< void(v1::events::command_started const &)> mongocxx::v1::apm::command_started ( ) const

Return the current "CommandStartedEvent" handler.

◆ command_succeeded()

std::function< void(v1::events::command_succeeded const &)> mongocxx::v1::apm::command_succeeded ( ) const

Return the current the "CommandSucceededEvent" handler.

◆ on_command_failed()

apm & mongocxx::v1::apm::on_command_failed ( std::function< void(v1::events::command_failed const &)> fn)

Set the "CommandFailedEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_command_started()

apm & mongocxx::v1::apm::on_command_started ( std::function< void(v1::events::command_started const &)> fn)

Set the "CommandStartedEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_command_succeeded()

apm & mongocxx::v1::apm::on_command_succeeded ( std::function< void(v1::events::command_succeeded const &)> fn)

Set the "CommandSucceededEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_server_closed()

apm & mongocxx::v1::apm::on_server_closed ( std::function< void(v1::events::server_closed const &)> fn)

Set the "ServerClosedEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_server_description_changed()

apm & mongocxx::v1::apm::on_server_description_changed ( std::function< void(v1::events::server_description_changed const &)> fn)

Set the "ServerDescriptionChangedEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_server_heartbeat_failed()

apm & mongocxx::v1::apm::on_server_heartbeat_failed ( std::function< void(v1::events::server_heartbeat_failed const &)> fn)

Set the "ServerHeartbeatFailedEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_server_heartbeat_started()

apm & mongocxx::v1::apm::on_server_heartbeat_started ( std::function< void(v1::events::server_heartbeat_started const &)> fn)

Set the "ServerHeartbeatStartedEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_server_heartbeat_succeeded()

apm & mongocxx::v1::apm::on_server_heartbeat_succeeded ( std::function< void(v1::events::server_heartbeat_succeeded const &)> fn)

Set the "ServerHeartbeatSucceededEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_server_opening()

apm & mongocxx::v1::apm::on_server_opening ( std::function< void(v1::events::server_opening const &)> fn)

Set the "ServerOpeningEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_topology_closed()

apm & mongocxx::v1::apm::on_topology_closed ( std::function< void(v1::events::topology_closed const &)> fn)

Set the "TopologyClosedEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_topology_description_changed()

apm & mongocxx::v1::apm::on_topology_description_changed ( std::function< void(v1::events::topology_description_changed const &)> fn)

Set the "TopologyDescriptionChangedEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ on_topology_opening()

apm & mongocxx::v1::apm::on_topology_opening ( std::function< void(v1::events::topology_opening const &)> fn)

Set the "TopologyOpeningEvent" handler.

Warning
It is undefined behavior for the handler to throw an exception.
Preconditions:
  • fn MUST NOT throw an exception when invoked.

◆ operator=() [1/2]

apm & mongocxx::v1::apm::operator= ( apm && other)
noexcept

Move assignment.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ operator=() [2/2]

apm & mongocxx::v1::apm::operator= ( apm const & other)

Copy assignment.

◆ server_closed()

std::function< void(v1::events::server_closed const &)> mongocxx::v1::apm::server_closed ( ) const

Return the current the "ServerClosedEvent" handler.

◆ server_description_changed()

std::function< void(v1::events::server_description_changed const &)> mongocxx::v1::apm::server_description_changed ( ) const

Return the current the "ServerDescriptionChangedEvent" handler.

◆ server_heartbeat_failed()

std::function< void(v1::events::server_heartbeat_failed const &)> mongocxx::v1::apm::server_heartbeat_failed ( ) const

Return the current the "ServerHeartbeatFailedEvent" handler.

◆ server_heartbeat_started()

std::function< void(v1::events::server_heartbeat_started const &)> mongocxx::v1::apm::server_heartbeat_started ( ) const

Return the current the "ServerHeartbeatStartedEvent" handler.

◆ server_heartbeat_succeeded()

std::function< void(v1::events::server_heartbeat_succeeded const &)> mongocxx::v1::apm::server_heartbeat_succeeded ( ) const

Return the current the "ServerHeartbeatSucceededEvent" handler.

◆ server_opening()

std::function< void(v1::events::server_opening const &)> mongocxx::v1::apm::server_opening ( ) const

Return the current the "ServerOpeningEvent" handler.

◆ topology_closed()

std::function< void(v1::events::topology_closed const &)> mongocxx::v1::apm::topology_closed ( ) const

Return the current the "TopologyClosedEvent" handler.

◆ topology_description_changed()

std::function< void(v1::events::topology_description_changed const &)> mongocxx::v1::apm::topology_description_changed ( ) const

Return the current the "TopologyDescriptionChangedEvent" handler.

◆ topology_opening()

std::function< void(v1::events::topology_opening const &)> mongocxx::v1::apm::topology_opening ( ) const

Return the current the "TopologyOpeningEvent" handler.


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