19 #include <mongocxx/events/command_failed_event.hpp> 20 #include <mongocxx/events/command_started_event.hpp> 21 #include <mongocxx/events/command_succeeded_event.hpp> 22 #include <mongocxx/events/heartbeat_failed_event.hpp> 23 #include <mongocxx/events/heartbeat_started_event.hpp> 24 #include <mongocxx/events/heartbeat_succeeded_event.hpp> 25 #include <mongocxx/events/server_changed_event.hpp> 26 #include <mongocxx/events/server_closed_event.hpp> 27 #include <mongocxx/events/server_opening_event.hpp> 28 #include <mongocxx/events/topology_changed_event.hpp> 29 #include <mongocxx/events/topology_closed_event.hpp> 30 #include <mongocxx/events/topology_opening_event.hpp> 32 #include <mongocxx/config/prelude.hpp> 35 MONGOCXX_INLINE_NAMESPACE_BEGIN
38 class MONGOCXX_API
apm {
51 apm& on_command_started(
59 const std::function<void(const mongocxx::events::command_started_event&)>& command_started()
73 apm& on_command_failed(
81 const std::function<void(const mongocxx::events::command_failed_event&)>& command_failed()
95 apm& on_command_succeeded(
103 const std::function<void(const mongocxx::events::command_succeeded_event&)>& command_succeeded()
117 apm& on_server_opening(
125 const std::function<void(const mongocxx::events::server_opening_event&)>& server_opening()
139 apm& on_server_closed(
147 const std::function<void(const mongocxx::events::server_closed_event&)>& server_closed()
const;
161 apm& on_server_changed(
169 const std::function<void(const mongocxx::events::server_changed_event&)>& server_changed()
183 apm& on_topology_opening(
191 const std::function<void(const mongocxx::events::topology_opening_event&)>& topology_opening()
205 apm& on_topology_closed(
213 const std::function<void(const mongocxx::events::topology_closed_event&)>& topology_closed()
229 apm& on_topology_changed(
237 const std::function<void(const mongocxx::events::topology_changed_event&)>& topology_changed()
251 apm& on_heartbeat_started(
259 const std::function<void(const mongocxx::events::heartbeat_started_event&)>& heartbeat_started()
273 apm& on_heartbeat_failed(
281 const std::function<void(const mongocxx::events::heartbeat_failed_event&)>& heartbeat_failed()
296 apm& on_heartbeat_succeeded(
298 heartbeat_succeeded);
305 const std::function<void(const mongocxx::events::heartbeat_succeeded_event&)>&
306 heartbeat_succeeded()
const;
309 std::function<void(const mongocxx::events::command_started_event&)> _command_started;
310 std::function<void(const mongocxx::events::command_failed_event&)> _command_failed;
311 std::function<void(const mongocxx::events::command_succeeded_event&)> _command_succeeded;
312 std::function<void(const mongocxx::events::server_closed_event&)> _server_closed;
313 std::function<void(const mongocxx::events::server_changed_event&)> _server_changed;
314 std::function<void(const mongocxx::events::server_opening_event&)> _server_opening;
315 std::function<void(const mongocxx::events::topology_closed_event&)> _topology_closed;
316 std::function<void(const mongocxx::events::topology_changed_event&)> _topology_changed;
317 std::function<void(const mongocxx::events::topology_opening_event&)> _topology_opening;
318 std::function<void(const mongocxx::events::heartbeat_started_event&)> _heartbeat_started;
319 std::function<void(const mongocxx::events::heartbeat_failed_event&)> _heartbeat_failed;
320 std::function<void(const mongocxx::events::heartbeat_succeeded_event&)> _heartbeat_succeeded;
324 MONGOCXX_INLINE_NAMESPACE_END
327 #include <mongocxx/config/postlude.hpp> Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24
An event notification sent when the driver successfully executes a MongoDB command.
Definition: command_succeeded_event.hpp:34
An event notification sent when the driver observes a change in any of the servers it is connected to...
Definition: topology_changed_event.hpp:34
An event notification sent when the driver initializes a server topology.
Definition: topology_opening_event.hpp:33
An event notification sent when the driver adds a MongoDB server to the topology description and begi...
Definition: server_opening_event.hpp:33
An event notification sent when the driver begins executing an "isMaster" command to check the status...
Definition: heartbeat_started_event.hpp:33
An event notification sent when the driver stops monitoring a server topology and destroys its descri...
Definition: topology_closed_event.hpp:33
An event notification sent when the driver fails to execute a MongoDB command.
Definition: command_failed_event.hpp:34
An event notification sent when the driver stops monitoring a MongoDB server and removes it from the ...
Definition: server_closed_event.hpp:34
An event notification sent when the driver completes an "isMaster" command to check the status of a s...
Definition: heartbeat_succeeded_event.hpp:34
An event notification sent when the driver failed to send an "isMaster" command to check the status o...
Definition: heartbeat_failed_event.hpp:33
An event notification sent when the driver observes a change in the status of a server it is connecte...
Definition: server_changed_event.hpp:35
An event notification sent when the driver begins executing a MongoDB command.
Definition: command_started_event.hpp:34