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