7 class config_view_change {
9 virtual void commit_change(unsigned view_id) = 0;
10 virtual ~config_view_change() {}
13 class config : public paxos_change {
18 config_view_change *vc;
19 proposer_acceptor paxos;
23 paxos_protocol::status heartbeat(int &r, string m, unsigned instance);
24 string value(const vector<string> &mems) const;
25 vector<string> members(const string &v) const;
26 void get_view(unsigned instance, vector<string> &m, lock &cfg_mutex_lock);
27 bool remove(const string &, lock &cfg_mutex_lock);
28 void reconstruct(lock &cfg_mutex_lock);
30 OK, // response and same view #
31 VIEWERR, // response but different view #
32 FAILURE, // no response
34 heartbeat_t doheartbeat(const string &m, lock &cfg_mutex_lock);
36 config(const string &_first, const string &_me, config_view_change *_vc);
37 unsigned view_id() { return my_view_id; }
38 const string &myaddr() const { return me; }
39 string dump() { return paxos.dump(); }
40 void get_view(unsigned instance, vector<string> &m);
41 void restore(const string &s);
42 bool add(const string &, unsigned view_id);
43 bool ismember(const string &m, unsigned view_id);
44 void heartbeater(void);
45 void paxos_commit(unsigned instance, const string &v);
46 rpcs *get_rpcs() { return paxos.get_rpcs(); }
47 void breakpoint(int b) { paxos.breakpoint(b); }