Start port
[iotcloud.git] / version2 / src / C / ArbitrationRound.h
1 #ifndef ARBITRATIONROUND_H
2 #define ARBITRATIONROUND_H
3
4 #define MAX_PARTS 10
5
6 class ArbitrationRound {
7  private:
8   Set<Abort *> * abortsBefore = NULL;
9   List<Entry *> * parts = NULL;
10   Commit commit = NULL;
11   int currentSize = 0;
12   bool didSendPart = false;
13   bool didGenerateParts = false;
14
15  public:
16   ArbitrationRound(Commit * _commit, Set<Abort *> * _abortsBefore);
17   void generateParts();
18   List<Entry> * getParts();
19   void removeParts(List<Entry> * removeParts);
20   bool isDoneSending();
21   void setCommit(Commit * _commit);
22   void addAbort(Abort * abort);
23   void addAborts(Set<Abort *> * aborts);
24   Set<Abort *> * getAborts();
25   int getAbortsCount();
26   int getCurrentSize();
27   bool isFull();
28   bool didSendPart();
29 };
30
31 #endif