static ostream& _prefix(std::ostream *_dout, Elector* elector) {
return *_dout << "mon." << elector->mon->name << "@" << elector->mon->rank
<< "(" << elector->mon->get_state_name()
- << ").elector(" << elector->logic.epoch << ") ";
+ << ").elector(" << elector->get_epoch() << ") ";
}
void ElectionLogic::persist_epoch(epoch_t e)
* @{
*/
friend class ElectionLogic;
- // FIXME!
- public:
ElectionLogic logic;
- Elector *elector;
- bool is_current_member(int rank);
/**
* @defgroup Elector_h_internal_types Internal Types
/**
* 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.
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.