]>
Commit | Line | Data |
---|---|---|
224ce89b WB |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | /* | |
4 | * Ceph - scalable distributed file system | |
5 | * | |
6 | * Copyright (C) 2013 Inktank, Inc | |
7 | * | |
8 | * This is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU Lesser General Public | |
10 | * License version 2.1, as published by the Free Software | |
11 | * Foundation. See file COPYING. | |
12 | * | |
13 | */ | |
14 | #ifndef CEPH_MON_OLDHEALTHMONITOR_H | |
15 | #define CEPH_MON_OLDHEALTHMONITOR_H | |
16 | ||
17 | #include "mon/QuorumService.h" | |
18 | ||
19 | //forward declaration | |
20 | namespace ceph { class Formatter; } | |
21 | class HealthService; | |
22 | ||
23 | class OldHealthMonitor : public QuorumService | |
24 | { | |
25 | map<int,HealthService*> services; | |
26 | ||
27 | protected: | |
28 | void service_shutdown() override; | |
29 | ||
30 | public: | |
31 | OldHealthMonitor(Monitor *m) : QuorumService(m) { } | |
32 | ~OldHealthMonitor() override { | |
33 | assert(services.empty()); | |
34 | } | |
35 | ||
36 | ||
37 | /** | |
38 | * @defgroup OldHealthMonitor_Inherited_h Inherited abstract methods | |
39 | * @{ | |
40 | */ | |
41 | void init() override; | |
42 | void get_health(list<pair<health_status_t,string> >& summary, | |
43 | list<pair<health_status_t,string> > *detail) override; | |
44 | bool service_dispatch(MonOpRequestRef op) override; | |
45 | ||
46 | void start_epoch() override; | |
47 | ||
48 | void finish_epoch() override; | |
49 | ||
50 | void cleanup() override { } | |
51 | void service_tick() override { } | |
52 | ||
53 | int get_type() override { | |
54 | return QuorumService::SERVICE_HEALTH; | |
55 | } | |
56 | ||
57 | string get_name() const override { | |
58 | return "health"; | |
59 | } | |
60 | ||
61 | /** | |
62 | * @} // OldHealthMonitor_Inherited_h | |
63 | */ | |
64 | }; | |
65 | ||
66 | #endif |