Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Metrics.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0-alpha.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 != 30850
17# error Ice version mismatch: an exact match is required for beta generated code
18# endif
19#endif
20
21#ifndef GLACIER2_API
22# if defined(GLACIER2_API_EXPORTS)
23# define GLACIER2_API ICE_DECLSPEC_EXPORT
24# else
25# define GLACIER2_API ICE_DECLSPEC_IMPORT
26# endif
27#endif
28
29// NOLINTBEGIN(modernize-concat-nested-namespaces)
30
31namespace IceMX
32{
33 class SessionMetrics;
34
35 /// A shared pointer to a SessionMetrics.
36 using SessionMetricsPtr = std::shared_ptr<SessionMetrics>;
37}
38
39namespace IceMX
40{
41 /// Provides information about Glacier2 sessions.
42 /// @headerfile Glacier2/Glacier2.h
43 class GLACIER2_API SessionMetrics : public Metrics
44 {
45 public:
46 /// Default constructor.
47 SessionMetrics() noexcept = default;
48
49 /// One-shot constructor to initialize all data members.
50 /// @param id The metrics identifier.
51 /// @param total The total number of objects observed by this metrics.
52 /// @param current The number of objects currently observed by this metrics.
53 /// @param totalLifetime The sum of the lifetime of each observed objects.
54 /// @param failures The number of failures observed.
55 /// @param forwardedClient The number of client requests forwarded.
56 /// @param forwardedServer The number of server requests forwarded.
57 /// @param routingTableSize The size of the routing table.
58 /// @param queuedClient The number of client requests queued.
59 /// @param queuedServer The number of server requests queued.
60 /// @param overriddenClient The number of client requests overridden.
61 /// @param overriddenServer The number of server requests overridden.
62 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 :
63 Metrics(std::move(id), total, current, totalLifetime, failures),
71 {
72 }
73
74 /// Gets the type ID of the associated Slice class.
75 /// @return The string `"::IceMX::SessionMetrics"`.
76 static const char* ice_staticId() noexcept;
77
78 [[nodiscard]] const char* ice_id() const noexcept override;
79
80 /// Creates a tuple with all the fields of this class.
81 /// @return A tuple with all the fields of this class.
82 [[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
83 {
85 }
86
87 /// Creates a shallow polymorphic copy of this instance.
88 /// @return The cloned value.
89 [[nodiscard]] SessionMetricsPtr ice_clone() const { return std::static_pointer_cast<SessionMetrics>(_iceCloneImpl()); }
90
91 void ice_printFields(std::ostream& os) const override;
92
93 /// The number of client requests forwarded.
94 std::int32_t forwardedClient{0};
95
96 /// The number of server requests forwarded.
97 std::int32_t forwardedServer{0};
98
99 /// The size of the routing table.
100 std::int32_t routingTableSize{0};
101
102 /// The number of client requests queued.
103 [[deprecated("As of Ice 3.8, the Glacier2 router no longer queues requests.")]] std::int32_t queuedClient{0};
104
105 /// The number of server requests queued.
106 [[deprecated("As of Ice 3.8, the Glacier2 router no longer queues requests.")]] std::int32_t queuedServer{0};
107
108 /// The number of client requests overridden.
109 [[deprecated("As of Ice 3.8, the Glacier2 router no longer queues requests.")]] std::int32_t overriddenClient{0};
110
111 /// The number of server requests overridden.
112 [[deprecated("As of Ice 3.8, the Glacier2 router no longer queues requests.")]] std::int32_t overriddenServer{0};
113
114 protected:
115 /// Copy constructor.
117
118 /// @private
119 [[nodiscard]] Ice::ValuePtr _iceCloneImpl() const override;
120
121 /// @private
122 void _iceWriteImpl(Ice::OutputStream*) const override;
123
124 /// @private
125 void _iceReadImpl(Ice::InputStream*) override;
126 };
127}
128
129// NOLINTEND(modernize-concat-nested-namespaces)
130
132#endif
Metrics() noexcept=default
Default constructor.
std::int32_t current
The number of objects currently observed by this metrics.
Definition Metrics.h:381
std::int64_t totalLifetime
The sum of the lifetime of each observed objects.
Definition Metrics.h:385
std::int32_t failures
The number of failures observed.
Definition Metrics.h:388
std::int64_t total
The total number of objects observed by this metrics.
Definition Metrics.h:378
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:82
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:109
std::int32_t routingTableSize
The size of the routing table.
Definition Metrics.h:100
std::int32_t queuedServer
The number of server requests queued.
Definition Metrics.h:106
SessionMetrics(const SessionMetrics &)=default
Copy constructor.
std::int32_t forwardedServer
The number of server requests forwarded.
Definition Metrics.h:97
SessionMetricsPtr ice_clone() const
Creates a shallow polymorphic copy of this instance.
Definition Metrics.h:89
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:94
std::int32_t overriddenServer
The number of server requests overridden.
Definition Metrics.h:112
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:103
Provides information about Glacier2 sessions.
Definition Metrics.h:44
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:36
The Ice Management eXtension facility.
Definition Metrics.h:32
std::shared_ptr< Value > ValuePtr
A shared pointer to a Value.
Definition ValueF.h:13