MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
command_succeeded.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <mongocxx/v1/events/command_succeeded-fwd.hpp> // IWYU pragma: export
18
19//
20
22
25
28
30
31#include <cstdint>
32
33namespace mongocxx {
34namespace v1 {
35namespace events {
36
45class command_succeeded {
46 private:
47 void const* _impl; // mongoc_apm_command_succeeded_t const
48
49 public:
54
59
63 MONGOCXX_ABI_EXPORT_CDECL(std::int64_t) duration() const;
64
69
74
79
84
88 MONGOCXX_ABI_EXPORT_CDECL(std::uint16_t) port() const;
89
90 class internal;
91
92 private:
93 /* explicit(false) */ command_succeeded(void const* impl);
94};
95
96} // namespace events
97} // namespace v1
98} // namespace mongocxx
99
101
A non-owning, read-only BSON document.
Definition view.hpp:54
A polyfill for std::optional<T>.
Definition optional.hpp:799
A polyfill for std::string_view.
Definition string_view.hpp:412
bsoncxx::v1::stdx::string_view command_name() const
Return the command name.
std::int64_t operation_id() const
Return the client-generated operation ID.
bsoncxx::v1::stdx::string_view host() const
Return the hostname for the connection used by the command.
std::uint16_t port() const
Return the port number for the connection used by the command.
std::int64_t duration() const
Return the execution time of the event.
bsoncxx::v1::document::view reply() const
Return the command reply.
std::int64_t request_id() const
Return the client-generated request ID.
bsoncxx::v1::stdx::optional< bsoncxx::v1::oid > service_id() const
Return the service ID for the command (when in load balancer mode).
Declares mongocxx::v1::events::command_succeeded.
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 macro guard postlude header.
The mongocxx v1 macro guard prelude header.
Declares entities describing APM events.
Declares entities whose ABI stability is guaranteed for documented symbols.
The top-level namespace within which all mongocxx library entities are declared.
Declares bsoncxx::v1::document::view.
Declares bsoncxx::v1::oid.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.