fpmas 1.6
sync_mode.h
Go to the documentation of this file.
1#ifndef FPMAS_SYNC_MODE_API_H
2#define FPMAS_SYNC_MODE_API_H
3
8#include "mutex.h"
9
10#include <unordered_set>
11
12namespace fpmas { namespace api { namespace graph {
13 template<typename T> class DistributedNode;
14 template<typename T> class DistributedEdge;
15}}}
16
17namespace fpmas { namespace api { namespace synchro {
25 template<typename T>
26 class DataSync {
27 public:
33 virtual void synchronize() = 0;
34
48 virtual void synchronize(
49 std::unordered_set<api::graph::DistributedNode<T>*>
50 nodes) = 0;
51
52 virtual ~DataSync() {}
53 };
54
78 template<typename T>
79 class SyncLinker {
80 public:
86 virtual void link(api::graph::DistributedEdge<T>* edge) = 0;
92 virtual void unlink(api::graph::DistributedEdge<T>* edge) = 0;
99
104 virtual void synchronize() = 0;
105
106 virtual ~SyncLinker() {}
107 };
108
119 template<typename T>
120 class SyncMode {
121 public:
137
145
152 virtual DataSync<T>& getDataSync() = 0;
153
154 virtual ~SyncMode() {};
155 };
156}}}
157#endif
Definition: distributed_edge.h:91
Definition: distributed_node.h:28
Definition: sync_mode.h:26
virtual void synchronize(std::unordered_set< api::graph::DistributedNode< T > * > nodes)=0
virtual void synchronize()=0
Definition: mutex.h:26
Definition: sync_mode.h:79
virtual void removeNode(api::graph::DistributedNode< T > *node)=0
virtual void link(api::graph::DistributedEdge< T > *edge)=0
virtual void unlink(api::graph::DistributedEdge< T > *edge)=0
Definition: sync_mode.h:120
virtual SyncLinker< T > & getSyncLinker()=0
virtual DataSync< T > & getDataSync()=0
virtual Mutex< T > * buildMutex(api::graph::DistributedNode< T > *node)=0
Definition: fpmas.cpp:3