Replica.h
Go to the documentation of this file.
1// **********************************************************************
2//
3// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
4//
5// This copy of Ice is licensed to you under the terms described in the
6// ICE_LICENSE file included in this distribution.
7//
8// **********************************************************************
9
10#ifndef REPLICA_H
11#define REPLICA_H
12
13#include <set>
14
15#include <Ice/Ice.h>
16#include <IceStorm/Election.h>
17
18namespace IceStormElection
19{
20
22 {
23 GroupNodeInfo(int i);
24 GroupNodeInfo(int i, LogUpdate l, const Ice::ObjectPrx& o = Ice::ObjectPrx());
25 bool operator<(const GroupNodeInfo& rhs) const;
26 bool operator==(const GroupNodeInfo& rhs) const;
27 //
28 // COMPILER FIX: Clang using libc++ requires to define operator=
29 //
30#if defined(__clang__) && defined(_LIBCPP_VERSION)
31 GroupNodeInfo& operator=(const GroupNodeInfo&);
32#endif
33 const int id;
35 const Ice::ObjectPrx observer;
36 };
37
38 class Replica : public virtual IceUtil::Shared
39 {
40 public:
41 virtual LogUpdate getLastLogUpdate() const = 0;
42 virtual void sync(const Ice::ObjectPrx&) = 0;
43 virtual void initMaster(const std::set<IceStormElection::GroupNodeInfo>&,
44 const LogUpdate&) = 0;
45 virtual Ice::ObjectPrx getObserver() const = 0;
46 virtual Ice::ObjectPrx getSync() const = 0;
47 };
48
50
51} // namespace IceStormElection
52
53#endif // RELICA_H
virtual LogUpdate getLastLogUpdate() const =0
virtual Ice::ObjectPrx getSync() const =0
virtual Ice::ObjectPrx getObserver() const =0
virtual void initMaster(const std::set< IceStormElection::GroupNodeInfo > &, const LogUpdate &)=0
virtual void sync(const Ice::ObjectPrx &)=0
IceUtil::Handle< Replica > ReplicaPtr
Definition Replica.h:49
bool operator==(const GroupNodeInfo &rhs) const
Definition NodeI.cpp:112
const Ice::ObjectPrx observer
Definition Replica.h:35
bool operator<(const GroupNodeInfo &rhs) const
Definition NodeI.cpp:106
A struct used for marking the last log update.
Definition LLURecord.h:103