Loading...
Searching...
No Matches
mongocxx::v_noabi::options::apm Class Reference

`#include <mongocxx/v_noabi/mongocxx/options/apm.hpp>`

## Description

Used by mongocxx::v_noabi::options::client::apm_opts.

See also
  - Command Logging and Monitoring (MongoDB Specifications)
  - SDAM Logging and Monitoring Specification (MongoDB Specifications)

## Public Member Functions

| apm ()=default
| Default initialization.
| apm (v1::apm other)
| Construct with the mongocxx::v1 equivalent.
std::function< void(events::command_failed_event const &)> const & | command_failed () const
| Retrieves the command failed monitoring callback.
std::function< void(events::command_started_event const &)> const & | command_started () const
| Retrieves the command started monitoring callback.
std::function< void(events::command_succeeded_event const &)> const & | command_succeeded () const
| Retrieves the command succeeded monitoring callback.
std::function< void(events::heartbeat_failed_event const &)> const & | heartbeat_failed () const
| Retrieves the heartbeat failed monitoring callback.
std::function< void(events::heartbeat_started_event const &)> const & | heartbeat_started () const
| Retrieves the heartbeat started monitoring callback.
std::function< void(events::heartbeat_succeeded_event const &)> const & | heartbeat_succeeded () const
| Retrieves the heartbeat succeeded monitoring callback.
apm & | on_command_failed (std::function< void(events::command_failed_event const &)> command_failed)
| Set the command failed monitoring callback. The callback takes a reference to a command_failed_event which will only contain valid data for the duration of the callback.
apm & | on_command_started (std::function< void(events::command_started_event const &)> command_started)
| Set the command started monitoring callback. The callback takes a reference to a command_started_event which will only contain valid data for the duration of the callback.
apm & | on_command_succeeded (std::function< void(events::command_succeeded_event const &)> command_succeeded)
| Set the command succeeded monitoring callback. The callback takes a reference to a command_succeeded_event which will only contain valid data for the duration of the callback.
apm & | on_heartbeat_failed (std::function< void(events::heartbeat_failed_event const &)> heartbeat_failed)
| Set the heartbeat failed monitoring callback. The callback takes a reference to a heartbeat_failed_event which will only contain valid data for the duration of the callback.
apm & | on_heartbeat_started (std::function< void(events::heartbeat_started_event const &)> heartbeat_started)
| Set the heartbeat started monitoring callback. The callback takes a reference to a heartbeat_started_event which will only contain valid data for the duration of the callback.
apm & | on_heartbeat_succeeded (std::function< void(events::heartbeat_succeeded_event const &)> heartbeat_succeeded)
| Set the heartbeat succeeded monitoring callback. The callback takes a reference to a heartbeat_succeeded_event which will only contain valid data for the duration of the callback.
apm & | on_server_changed (std::function< void(events::server_changed_event const &)> server_changed)
| Set the server description changed monitoring callback. The callback takes a reference to a server_changed_event which will only contain valid data for the duration of the callback.
apm & | on_server_closed (std::function< void(events::server_closed_event const &)> server_closed)
| Set the server closed monitoring callback. The callback takes a reference to a server_closed_event which will only contain valid data for the duration of the callback.
apm & | on_server_opening (std::function< void(events::server_opening_event const &)> server_opening)
| Set the server opening monitoring callback. The callback takes a reference to a server_opening_event which will only contain valid data for the duration of the callback.
apm & | on_topology_changed (std::function< void(events::topology_changed_event const &)> topology_changed)
| Set the topology description changed monitoring callback. The callback takes a reference to a topology_changed_event which will only contain valid data for the duration of the callback.
apm & | on_topology_closed (std::function< void(events::topology_closed_event const &)> topology_closed)
| Set the topology closed monitoring callback. The callback takes a reference to a topology_closed_event which will only contain valid data for the duration of the callback.
apm & | on_topology_opening (std::function< void(events::topology_opening_event const &)> topology_opening)
| Set the topology_opening monitoring callback. The callback takes a reference to a topology_opening_event which will only contain valid data for the duration of the callback.
| operator v1::apm () const
| Convert to the mongocxx::v1 equivalent.
std::function< void(events::server_changed_event const &)> const & | server_changed () const
| Retrieves the server description changed monitoring callback.
std::function< void(events::server_closed_event const &)> const & | server_closed () const
| Retrieves the server closed monitoring callback.
std::function< void(events::server_opening_event const &)> const & | server_opening () const
| Retrieves the server opening monitoring callback.
std::function< void(events::topology_changed_event const &)> const & | topology_changed () const
| Retrieves the topology description changed monitoring callback.
std::function< void(events::topology_closed_event const &)> const & | topology_closed () const
| Retrieves the topology closed monitoring callback.
std::function< void(events::topology_opening_event const &)> const & | topology_opening () const
| Retrieves the topology_opening monitoring callback.

## Constructor & Destructor Documentation

## apm() [1/2]

mongocxx::v_noabi::options::apm::apm | ( |  | ) |

default

Default initialization.

## apm() [2/2]

mongocxx::v_noabi::options::apm::apm | ( | v1::apm | other | ) |

Construct with the mongocxx::v1 equivalent.

## Member Function Documentation

## command_failed()

std::function< void(events::command_failed_event const &)> const & mongocxx::v_noabi::options::apm::command_failed | ( |  | ) | const

inline

Retrieves the command failed monitoring callback.

Returns
  The command failed monitoring callback.

## command_started()

std::function< void(events::command_started_event const &)> const & mongocxx::v_noabi::options::apm::command_started | ( |  | ) | const

inline

Retrieves the command started monitoring callback.

Returns
  The command started monitoring callback.

## command_succeeded()

std::function< void(events::command_succeeded_event const &)> const & mongocxx::v_noabi::options::apm::command_succeeded | ( |  | ) | const

inline

Retrieves the command succeeded monitoring callback.

Returns
  The command succeeded monitoring callback.

## heartbeat_failed()

std::function< void(events::heartbeat_failed_event const &)> const & mongocxx::v_noabi::options::apm::heartbeat_failed | ( |  | ) | const

inline

Retrieves the heartbeat failed monitoring callback.

Returns
  The heartbeat failed monitoring callback.

## heartbeat_started()

std::function< void(events::heartbeat_started_event const &)> const & mongocxx::v_noabi::options::apm::heartbeat_started | ( |  | ) | const

inline

Retrieves the heartbeat started monitoring callback.

Returns
  The heartbeat started monitoring callback.

## heartbeat_succeeded()

std::function< void(events::heartbeat_succeeded_event const &)> const & mongocxx::v_noabi::options::apm::heartbeat_succeeded | ( |  | ) | const

inline

Retrieves the heartbeat succeeded monitoring callback.

Returns
  The heartbeat succeeded monitoring callback.

## on_command_failed()

apm & mongocxx::v_noabi::options::apm::on_command_failed | ( | std::function< void(events::command_failed_event const &)> | command_failed | ) |

inline

Set the command failed monitoring callback. The callback takes a reference to a command_failed_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  command_failed | The command failed monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_command_started()

apm & mongocxx::v_noabi::options::apm::on_command_started | ( | std::function< void(events::command_started_event const &)> | command_started | ) |

inline

Set the command started monitoring callback. The callback takes a reference to a command_started_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  command_started | The command started monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_command_succeeded()

apm & mongocxx::v_noabi::options::apm::on_command_succeeded | ( | std::function< void(events::command_succeeded_event const &)> | command_succeeded | ) |

inline

Set the command succeeded monitoring callback. The callback takes a reference to a command_succeeded_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  command_succeeded | The command succeeded monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_heartbeat_failed()

apm & mongocxx::v_noabi::options::apm::on_heartbeat_failed | ( | std::function< void(events::heartbeat_failed_event const &)> | heartbeat_failed | ) |

inline

Set the heartbeat failed monitoring callback. The callback takes a reference to a heartbeat_failed_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  heartbeat_failed | The heartbeat failed monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_heartbeat_started()

apm & mongocxx::v_noabi::options::apm::on_heartbeat_started | ( | std::function< void(events::heartbeat_started_event const &)> | heartbeat_started | ) |

inline

Set the heartbeat started monitoring callback. The callback takes a reference to a heartbeat_started_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  heartbeat_started | The heartbeat started monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_heartbeat_succeeded()

apm & mongocxx::v_noabi::options::apm::on_heartbeat_succeeded | ( | std::function< void(events::heartbeat_succeeded_event const &)> | heartbeat_succeeded | ) |

inline

Set the heartbeat succeeded monitoring callback. The callback takes a reference to a heartbeat_succeeded_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  heartbeat_succeeded | The heartbeat succeeded monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_server_changed()

apm & mongocxx::v_noabi::options::apm::on_server_changed | ( | std::function< void(events::server_changed_event const &)> | server_changed | ) |

inline

Set the server description changed monitoring callback. The callback takes a reference to a server_changed_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  server_changed | The server description changed monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_server_closed()

apm & mongocxx::v_noabi::options::apm::on_server_closed | ( | std::function< void(events::server_closed_event const &)> | server_closed | ) |

inline

Set the server closed monitoring callback. The callback takes a reference to a server_closed_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  server_closed | The server closed monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_server_opening()

apm & mongocxx::v_noabi::options::apm::on_server_opening | ( | std::function< void(events::server_opening_event const &)> | server_opening | ) |

inline

Set the server opening monitoring callback. The callback takes a reference to a server_opening_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  server_opening | The server opening monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_topology_changed()

apm & mongocxx::v_noabi::options::apm::on_topology_changed | ( | std::function< void(events::topology_changed_event const &)> | topology_changed | ) |

inline

Set the topology description changed monitoring callback. The callback takes a reference to a topology_changed_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  topology_changed | The topology description changed monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_topology_closed()

apm & mongocxx::v_noabi::options::apm::on_topology_closed | ( | std::function< void(events::topology_closed_event const &)> | topology_closed | ) |

inline

Set the topology closed monitoring callback. The callback takes a reference to a topology_closed_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  topology_closed | The topology closed monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## on_topology_opening()

apm & mongocxx::v_noabi::options::apm::on_topology_opening | ( | std::function< void(events::topology_opening_event const &)> | topology_opening | ) |

inline

Set the topology_opening monitoring callback. The callback takes a reference to a topology_opening_event which will only contain valid data for the duration of the callback.

Warning
  If the callback throws an exception, the behavior is undefined.

Parameters

  topology_opening | The topology_opening monitoring callback.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## operator v1::apm()

mongocxx::v_noabi::options::apm::operator v1::apm | ( |  | ) | const

inline explicit

Convert to the mongocxx::v1 equivalent.

## server_changed()

std::function< void(events::server_changed_event const &)> const & mongocxx::v_noabi::options::apm::server_changed | ( |  | ) | const

inline

Retrieves the server description changed monitoring callback.

Returns
  The server description changed monitoring callback.

## server_closed()

std::function< void(events::server_closed_event const &)> const & mongocxx::v_noabi::options::apm::server_closed | ( |  | ) | const

inline

Retrieves the server closed monitoring callback.

Returns
  The server closed monitoring callback.

## server_opening()

std::function< void(events::server_opening_event const &)> const & mongocxx::v_noabi::options::apm::server_opening | ( |  | ) | const

inline

Retrieves the server opening monitoring callback.

Returns
  The server opening monitoring callback.

## topology_changed()

std::function< void(events::topology_changed_event const &)> const & mongocxx::v_noabi::options::apm::topology_changed | ( |  | ) | const

inline

Retrieves the topology description changed monitoring callback.

Returns
  The topology description changed monitoring callback.

## topology_closed()

std::function< void(events::topology_closed_event const &)> const & mongocxx::v_noabi::options::apm::topology_closed | ( |  | ) | const

inline

Retrieves the topology closed monitoring callback.

Returns
  The topology closed monitoring callback.

## topology_opening()

std::function< void(events::topology_opening_event const &)> const & mongocxx::v_noabi::options::apm::topology_opening | ( |  | ) | const

inline

Retrieves the topology_opening monitoring callback.

Returns
  The topology_opening monitoring callback.

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

- mongocxx/v_noabi/mongocxx/options/apm.hpp