blob: c223778d8084bc0c46e0eda0f0dc1491e5beb2d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
#ifndef INSTRUMENTATION_I_H
#define INSTRUMENTATION_I_H
#include <Ice/MetricsObserverI.h>
#include <IceStorm/Instrumentation.h>
#include <IceStorm/Metrics.h>
namespace IceStorm
{
class TopicObserverI final : public IceStorm::Instrumentation::TopicObserver,
public IceMX::ObserverT<IceMX::TopicMetrics>
{
public:
void published() override;
void forwarded() override;
};
class SubscriberObserverI final : public IceStorm::Instrumentation::SubscriberObserver,
public IceMX::ObserverT<IceMX::SubscriberMetrics>
{
public:
void queued(int) override;
void outstanding(int) override;
void delivered(int) override;
};
class TopicManagerObserverI final : public IceStorm::Instrumentation::TopicManagerObserver
{
public:
TopicManagerObserverI(const std::shared_ptr<IceInternal::MetricsAdminI>&);
void setObserverUpdater(const std::shared_ptr<IceStorm::Instrumentation::ObserverUpdater>&) override;
std::shared_ptr<IceStorm::Instrumentation::TopicObserver>
getTopicObserver(const std::string&, const std::string&,
const std::shared_ptr<IceStorm::Instrumentation::TopicObserver>&) override;
std::shared_ptr<IceStorm::Instrumentation::SubscriberObserver>
getSubscriberObserver(const std::string &,
const std::string &,
const std::shared_ptr<Ice::ObjectPrx> &,
const IceStorm::QoS &,
const std::shared_ptr<IceStorm::TopicPrx> &,
IceStorm::Instrumentation::SubscriberState,
const std::shared_ptr<IceStorm::Instrumentation::SubscriberObserver>&) override;
private:
const std::shared_ptr<IceInternal::MetricsAdminI> _metrics;
IceMX::ObserverFactoryT<TopicObserverI> _topics;
IceMX::ObserverFactoryT<SubscriberObserverI> _subscribers;
};
}
#endif
|