Go to the documentation of this file.
13 #include <IceUtil/IceUtil.h>
18 #include <IceUtil/Timer.h>
27 class NodeI :
public Node,
public IceUtil::Monitor<IceUtil::RecMutex>
32 int,
const std::map<int, NodePrx>&);
38 void merge(
const std::set<int>&);
40 virtual void invitation(
int,
const std::string&,
const Ice::Current&);
41 virtual void ready(
int,
const std::string&,
const Ice::ObjectPrx&,
int,
Ice::Long,
const Ice::Current&);
42 virtual void accept(
int,
const std::string&,
const Ice::IntSeq&,
const Ice::ObjectPrx&,
const LogUpdate&,
int,
45 virtual bool areYouThere(
const std::string&,
int,
const Ice::Current&)
const;
46 virtual Ice::ObjectPrx
sync(
const Ice::Current&)
const;
71 const Ice::ObjectPrx _replicaProxy;
74 const std::map<int, NodePrx> _nodes;
75 const std::map<int, NodePrx> _nodesOneway;
87 std::set<GroupNodeInfo> _up;
88 std::set<int> _invitesIssued;
89 std::set<int> _invitesAccepted;
94 Ice::ObjectPrx _coordinatorProxy;
98 IceUtil::TimerTaskPtr _mergeTask;
99 IceUtil::TimerTaskPtr _timeoutTask;
100 IceUtil::TimerTaskPtr _checkTask;
101 IceUtil::TimerTaskPtr _mergeContinueTask;
118 _node->finishUpdate();
136 _master = _node->startCachedRead(_generation, file, line);
144 _node->finishUpdate();
169 Ice::ObjectPrx _master;
182 _node->startObserverUpdate(generation, file, line);
190 _node->finishUpdate();
201 #endif // ELECTION_I_H
void merge(const std::set< int > &)
IceUtil::Handle< Observers > ObserversPtr
IceUtil::Handle< NodeI > NodeIPtr
ObserverUpdateHelper(const NodeIPtr &node, Ice::Long generation, const char *file, int line)
idempotent NodeInfoSeq nodes()
Get the replication group information.
A struct used for marking the last log update.
Ice::ObjectPrx getMaster() const
idempotent bool areYouCoordinator()
Determine if this node is a coordinator.
void recovery(Ice::Long=-1)
bool updateMaster(const char *, int)
idempotent Object * sync()
Get the sync object for the replica hosted by this node.
Ice::ObjectPrx startCachedRead(Ice::Long &, const char *, int)
virtual void ready(int, const std::string &, const Ice::ObjectPrx &, int, Ice::Long, const Ice::Current &)
armarx::core::time::DateTime Time
Ice::Long generation() const
virtual void accept(int, const std::string &, const Ice::IntSeq &, const Ice::ObjectPrx &, const LogUpdate &, int, const Ice::Current &)
FinishUpdateHelper(const NodeIPtr &node)
bool observerPrecondition(Ice::Long generation) const
virtual void invitation(int, const std::string &, const Ice::Current &)
::std::vector< ::IceStormElection::NodeInfo > NodeInfoSeq
A sequence of node info.
void checkObserverInit(Ice::Long)
idempotent QueryInfo query()
Get the query information for the given node.
Ice::ObjectPrx startUpdate(Ice::Long &, const char *, int)
virtual bool areYouThere(const std::string &, int, const Ice::Current &) const
NodeI(const IceStorm::InstancePtr &, const ReplicaPtr &, const Ice::ObjectPrx &, int, const std::map< int, NodePrx > &)
CachedReadHelper(const NodeIPtr &node, const char *file, int line)
void startObserverUpdate(Ice::Long, const char *, int)