// // Copyright (c) ZeroC, Inc. All rights reserved. // #ifndef REPLICA_H #define REPLICA_H #include #include #include namespace IceStormElection { struct GroupNodeInfo { explicit GroupNodeInfo(int i); GroupNodeInfo(int i, LogUpdate l, std::shared_ptr o = nullptr); bool operator<(const GroupNodeInfo& rhs) const; bool operator==(const GroupNodeInfo& rhs) const; const int id; const LogUpdate llu; const std::shared_ptr observer; }; class Replica { public: virtual LogUpdate getLastLogUpdate() const = 0; virtual void sync(const std::shared_ptr&) = 0; virtual void initMaster(const std::set&, const LogUpdate&) = 0; virtual std::shared_ptr getObserver() const = 0; virtual std::shared_ptr getSync() const = 0; }; } #endif // RELICA_H