summaryrefslogtreecommitdiffstats
path: root/src/mon/Elector.h
diff options
context:
space:
mode:
authorGreg Farnum <gfarnum@redhat.com>2019-06-13 20:05:37 +0200
committerGreg Farnum <gfarnum@redhat.com>2019-08-19 22:04:59 +0200
commitbf9523bc89656fb0c7d73009c21451946448af2f (patch)
tree05a118b9055366a492c96c67bdbb87ee4ecbf382 /src/mon/Elector.h
parentelector: create declare_standlone_victory in Elector/Logic for Monitor (diff)
downloadceph-bf9523bc89656fb0c7d73009c21451946448af2f.tar.xz
ceph-bf9523bc89656fb0c7d73009c21451946448af2f.zip
elector: make ElectionLogic private to Elector; undo most public shenanigans
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
Diffstat (limited to 'src/mon/Elector.h')
-rw-r--r--src/mon/Elector.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mon/Elector.h b/src/mon/Elector.h
index 02beaa11710..8ade46e6be8 100644
--- a/src/mon/Elector.h
+++ b/src/mon/Elector.h
@@ -76,11 +76,7 @@ class Elector {
* @{
*/
friend class ElectionLogic;
- // FIXME!
- public:
ElectionLogic logic;
- Elector *elector;
- bool is_current_member(int rank);
/**
* @defgroup Elector_h_internal_types Internal Types
@@ -106,9 +102,11 @@ class Elector {
/**
* The Monitor instance associated with this class.
*/
+ // FIXME!
+public:
Monitor *mon;
-
private:
+
/**
* Event callback responsible for dealing with an expired election once a
* timer runs out and fires up.
@@ -368,14 +366,16 @@ private:
void handle_nak(MonOpRequestRef op);
public:
+ Elector *elector;
+ bool is_current_member(int rank);
+
/**
* Create an Elector class
*
* @param m A Monitor instance
*/
explicit Elector(Monitor *m) : logic(this),
- elector(this),
- mon(m) {}
+ mon(m), elector(this) {}
/**
* Initiate the Elector class.