#ifndef log_h
#define log_h
-#include <string>
-#include <vector>
+#include "types.h"
+#include "paxos_protocol.h"
-
-class acceptor;
+class proposer_acceptor;
class log {
- private:
- std::string name;
- acceptor *pxs;
- public:
- log (acceptor*, std::string _me);
- std::string dump();
- void restore(std::string s);
- void logread(void);
- /* Log a committed paxos instance*/
- void loginstance(unsigned instance, std::string v);
- /* Log the highest proposal number that the local paxos acceptor has ever seen */
- void logprop(prop_t n_h);
- /* Log the proposal (proposal number and value) that the local paxos acceptor
- accept has ever accepted */
- void logaccept(prop_t n_a, std::string v);
+ private:
+ string name;
+ proposer_acceptor *pxs;
+ public:
+ log (proposer_acceptor*, string _me);
+ string dump();
+ void restore(string s);
+ void logread(void);
+ // Log a committed paxos instance
+ void loginstance(unsigned instance, string v);
+ // Log the highest proposal number that the local paxos acceptor has ever seen
+ void logprop(prop_t n_h);
+ // Log the proposal (proposal number and value) that the local paxos acceptor
+ // accept has ever accepted
+ void logaccept(prop_t n_a, string v);
};
#endif /* log_h */