8 class config_view_change {
10 virtual void commit_change(unsigned vid) = 0;
11 virtual ~config_view_change() {};
14 class config : public paxos_change {
22 config_view_change *vc;
23 std::vector<std::string> mems;
24 pthread_mutex_t cfg_mutex;
25 pthread_cond_t heartbeat_cond;
26 pthread_cond_t config_cond;
27 paxos_protocol::status heartbeat(std::string m, unsigned instance, int &r);
28 std::string value(std::vector<std::string> mems);
29 std::vector<std::string> members(std::string v);
30 std::vector<std::string> get_view_wo(unsigned instance);
31 bool remove_wo(std::string);
34 OK, // response and same view #
35 VIEWERR, // response but different view #
36 FAILURE, // no response
38 heartbeat_t doheartbeat(std::string m);
40 config(std::string _first, std::string _me, config_view_change *_vc);
41 unsigned vid() { return myvid; }
42 std::string myaddr() { return me; };
43 std::string dump() { return acc->dump(); };
44 std::vector<std::string> get_view(unsigned instance);
45 void restore(std::string s);
46 bool add(std::string, unsigned vid);
47 bool ismember(std::string m, unsigned vid);
48 void heartbeater(void);
49 void paxos_commit(unsigned instance, std::string v);
50 rpcs *get_rpcs() { return acc->get_rpcs(); }
51 void breakpoint(int b) { pro->breakpoint(b); }