X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/5fd8cc8409d0efadc07dfe8d6774ad9ff477663d..e478ac59e66e89cbc174e781ac715c8644539947:/log.h diff --git a/log.h b/log.h index 5bd2779..e8acd4a 100644 --- a/log.h +++ b/log.h @@ -1,28 +1,27 @@ #ifndef log_h #define log_h -#include -#include +#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 */