From: Samuel Just Date: Sat, 13 Jul 2024 02:16:02 +0000 (+0000) Subject: mon/NVMeofGwMon.h: tabbing, line length, formatting X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c4dc6a13101f9c75aaab557bec1735145b4a677;p=ceph-ci.git mon/NVMeofGwMon.h: tabbing, line length, formatting Signed-off-by: Samuel Just (cherry picked from commit 1f470f0388b40bd58eef4191fb825a241f7f076f) --- diff --git a/src/mon/NVMeofGwMon.h b/src/mon/NVMeofGwMon.h index 960a8960ed6..acd72dfe0c4 100644 --- a/src/mon/NVMeofGwMon.h +++ b/src/mon/NVMeofGwMon.h @@ -18,69 +18,72 @@ #include "NVMeofGwMap.h" struct LastBeacon { - NvmeGwId gw_id; - NvmeGroupKey group_key; - - // Comparison operators to allow usage as a map key - bool operator<(const LastBeacon& other) const { - if (gw_id != other.gw_id) return gw_id < other.gw_id; - return group_key < other.group_key; - } - - bool operator==(const LastBeacon& other) const { - return gw_id == other.gw_id && - group_key == other.group_key; - } + NvmeGwId gw_id; + NvmeGroupKey group_key; + + // Comparison operators to allow usage as a map key + bool operator<(const LastBeacon& other) const { + if (gw_id != other.gw_id) return gw_id < other.gw_id; + return group_key < other.group_key; + } + + bool operator==(const LastBeacon& other) const { + return gw_id == other.gw_id && + group_key == other.group_key; + } }; class NVMeofGwMon: public PaxosService, public md_config_obs_t { - NVMeofGwMap map; //NVMeGWMap - NVMeofGwMap pending_map; - std::map last_beacon; - ceph::coarse_mono_clock::time_point last_tick; + NVMeofGwMap map; //NVMeGWMap + NVMeofGwMap pending_map; + std::map last_beacon; + ceph::coarse_mono_clock::time_point last_tick; public: - NVMeofGwMon(Monitor &mn, Paxos &p, const std::string& service_name): PaxosService(mn, p, service_name) {map.mon = &mn;} - ~NVMeofGwMon() override {} + NVMeofGwMon(Monitor &mn, Paxos &p, const std::string& service_name) + : PaxosService(mn, p, service_name) { + map.mon = &mn; + } + ~NVMeofGwMon() override {} + // config observer + const char** get_tracked_conf_keys() const override; + void handle_conf_change( + const ConfigProxy& conf, const std::set &changed) override {}; - // config observer - const char** get_tracked_conf_keys() const override; - void handle_conf_change(const ConfigProxy& conf, const std::set &changed) override {}; + // 3 pure virtual methods of the paxosService + void create_initial() override {}; + void create_pending() override; + void encode_pending(MonitorDBStore::TransactionRef t) override; - // 3 pure virtual methods of the paxosService - void create_initial() override {}; - void create_pending() override; - void encode_pending(MonitorDBStore::TransactionRef t) override; + void init() override; + void on_shutdown() override; + void on_restart() override; + void update_from_paxos(bool *need_bootstrap) override; - void init() override; - void on_shutdown() override; - void on_restart() override; - void update_from_paxos(bool *need_bootstrap) override; + version_t get_trim_to() const override; - version_t get_trim_to() const override; + bool preprocess_query(MonOpRequestRef op) override; + bool prepare_update(MonOpRequestRef op) override; - bool preprocess_query(MonOpRequestRef op) override; - bool prepare_update(MonOpRequestRef op) override; + bool preprocess_command(MonOpRequestRef op); + bool prepare_command(MonOpRequestRef op); - bool preprocess_command(MonOpRequestRef op); - bool prepare_command(MonOpRequestRef op); + void encode_full(MonitorDBStore::TransactionRef t) override {} - void encode_full(MonitorDBStore::TransactionRef t) override { } + bool preprocess_beacon(MonOpRequestRef op); + bool prepare_beacon(MonOpRequestRef op); - bool preprocess_beacon(MonOpRequestRef op); - bool prepare_beacon(MonOpRequestRef op); + void tick() override; + void print_summary(ceph::Formatter *f, std::ostream *ss) const; - void tick() override; - void print_summary(ceph::Formatter *f, std::ostream *ss) const; - - void check_subs(bool type); - void check_sub(Subscription *sub); + void check_subs(bool type); + void check_sub(Subscription *sub); private: - void synchronize_last_beacon(); + void synchronize_last_beacon(); };