Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Metrics.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0
4// <auto-generated>Generated from Slice file 'Metrics.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Glacier2_Metrics_h_
8#define Glacier2_Metrics_h_
9
11#include <Ice/Ice.h>
12#include <Ice/Metrics.h>
13#include <Glacier2/Config.h>
14
15#ifndef ICE_DISABLE_VERSION
16# if ICE_INT_VERSION / 100 != 308
17# error Ice version mismatch!
18# endif
19# if ICE_INT_VERSION % 100 >= 50
20# error Beta header file detected
21# endif
22# if ICE_INT_VERSION % 100 < 0
23# error Ice patch level mismatch!
24# endif
25#endif
26
27#ifndef GLACIER2_API
28# if defined(GLACIER2_API_EXPORTS)
29# define GLACIER2_API ICE_DECLSPEC_EXPORT
30# else
31# define GLACIER2_API ICE_DECLSPEC_IMPORT
32# endif
33#endif
34
35// NOLINTBEGIN(modernize-concat-nested-namespaces)
36
37namespace IceMX
38{
39 class SessionMetrics;
40
41 /// A shared pointer to a SessionMetrics.
42 using SessionMetricsPtr = std::shared_ptr<SessionMetrics>;
43}
44
45namespace IceMX
46{
47 /// Provides information about Glacier2 sessions.
48 /// @remarks The Slice compiler generated this class from Slice class `::IceMX::SessionMetrics`.
49 /// @headerfile Glacier2/Glacier2.h
50 class GLACIER2_API SessionMetrics : public Metrics
51 {
52 public:
53 /// Default constructor.
54 SessionMetrics() noexcept = default;
55
56 /// One-shot constructor to initialize all data members.
57 /// @param id The metrics identifier.
58 /// @param total The total number of objects observed by this metrics.
59 /// @param current The number of objects currently observed by this metrics.
60 /// @param totalLifetime The sum of the lifetime of each observed objects.
61 /// @param failures The number of failures observed.
62 /// @param forwardedClient The number of client requests forwarded.
63 /// @param forwardedServer The number of server requests forwarded.
64 /// @param routingTableSize The size of the routing table.
65 /// @param queuedClient The number of client requests queued.
66 /// @param queuedServer The number of server requests queued.
67 /// @param overriddenClient The number of client requests overridden.
68 /// @param overriddenServer The number of server requests overridden.
69 SessionMetrics(std::string id, std::int64_t total, std::int32_t current, std::int64_t totalLifetime, std::int32_t failures, std::int32_t forwardedClient, std::int32_t forwardedServer, std::int32_t routingTableSize, std::int32_t queuedClient, std::int32_t queuedServer, std::int32_t overriddenClient, std::int32_t overriddenServer) noexcept :
70 Metrics(std::move(id), total, current, totalLifetime, failures),
78 {
79 }
80
81 /// Gets the type ID of the associated Slice class.
82 /// @return The string `"::IceMX::SessionMetrics"`.
83 static const char* ice_staticId() noexcept;
84
85 [[nodiscard]] const char* ice_id() const noexcept override;
86
87 /// Creates a tuple with all the fields of this class.
88 /// @return A tuple with all the fields of this class.
89 [[nodiscard]] std::tuple<const std::string&, const std::int64_t&, const std::int32_t&, const std::int64_t&, const std::int32_t&, const std::int32_t&, const std::int32_t&, const std::int32_t&, const std::int32_t&, const std::int32_t&, const std::int32_t&, const std::int32_t&> ice_tuple() const
90 {
92 }
93
94 /// Creates a shallow polymorphic copy of this instance.
95 /// @return The cloned value.
96 [[nodiscard]] SessionMetricsPtr ice_clone() const { return std::static_pointer_cast<SessionMetrics>(_iceCloneImpl()); }
97
98 void ice_printFields(std::ostream& os) const override;
99
100 /// The number of client requests forwarded.
101 std::int32_t forwardedClient{0};
102
103 /// The number of server requests forwarded.
104 std::int32_t forwardedServer{0};
105
106 /// The size of the routing table.
107 std::int32_t routingTableSize{0};
108
109 /// The number of client requests queued.
110 [[deprecated("As of Ice 3.8, the Glacier2 router no longer queues requests.")]] std::int32_t queuedClient{0};
111
112 /// The number of server requests queued.
113 [[deprecated("As of Ice 3.8, the Glacier2 router no longer queues requests.")]] std::int32_t queuedServer{0};
114
115 /// The number of client requests overridden.
116 [[deprecated("As of Ice 3.8, the Glacier2 router no longer queues requests.")]] std::int32_t overriddenClient{0};
117
118 /// The number of server requests overridden.
119 [[deprecated("As of Ice 3.8, the Glacier2 router no longer queues requests.")]] std::int32_t overriddenServer{0};
120
121 protected:
122 /// Copy constructor.
124
125 /// @private
126 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
127
128 /// @private
129 void _iceWriteImpl(Ice::OutputStream*) const override;
130
131 /// @private
132 void _iceReadImpl(Ice::InputStream*) override;
133 };
134}
135
136// NOLINTEND(modernize-concat-nested-namespaces)
137
139#endif
Metrics() noexcept=default
Default constructor.
std::int32_t current
The number of objects currently observed by this metrics.
Definition Metrics.h:389
std::int64_t totalLifetime
The sum of the lifetime of each observed objects.
Definition Metrics.h:393
std::int32_t failures
The number of failures observed.
Definition Metrics.h:396
std::int64_t total
The total number of objects observed by this metrics.
Definition Metrics.h:386
std::tuple< const std::string &, const std::int64_t &, const std::int32_t &, const std::int64_t &, const std::int32_t &, const std::int32_t &, const std::int32_t &, const std::int32_t &, const std::int32_t &, const std::int32_t &, const std::int32_t &, const std::int32_t & > ice_tuple() const
Creates a tuple with all the fields of this class.
Definition Metrics.h:89
const char * ice_id() const noexcept override
Gets the Slice type ID of the most-derived class supported by this object.
std::int32_t overriddenClient
The number of client requests overridden.
Definition Metrics.h:116
std::int32_t routingTableSize
The size of the routing table.
Definition Metrics.h:107
std::int32_t queuedServer
The number of server requests queued.
Definition Metrics.h:113
SessionMetrics(const SessionMetrics &)=default
Copy constructor.
std::int32_t forwardedServer
The number of server requests forwarded.
Definition Metrics.h:104
SessionMetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:96
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice class.
SessionMetrics() noexcept=default
Default constructor.
std::int32_t forwardedClient
The number of client requests forwarded.
Definition Metrics.h:101
std::int32_t overriddenServer
The number of server requests overridden.
Definition Metrics.h:119
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
std::int32_t queuedClient
The number of client requests queued.
Definition Metrics.h:110
Provides information about Glacier2 sessions.
Definition Metrics.h:51
Represents a byte buffer used for unmarshaling data encoded using the Slice encoding.
Definition InputStream.h:50
Represents a byte buffer used for marshaling data using the Slice encoding.
std::shared_ptr< SessionMetrics > SessionMetricsPtr
A shared pointer to a SessionMetrics.
Definition Metrics.h:42
The Ice Management eXtension facility.
Definition Metrics.h:38
std::shared_ptr< Value > ValuePtr
A shared pointer to a Value.
Definition ValueF.h:13