Compiles
[iotcloud.git] / version2 / src / C / ArbitrationRound.h
1 #ifndef ARBITRATIONROUND_H
2 #define ARBITRATIONROUND_H
3
4 #define ArbitrationRound_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         Commit *getCommit();
21         Vector<Entry *> *getParts();
22         void removeParts(Vector<Entry *> *removeParts);
23         bool isDoneSending();
24         void setCommit(Commit *_commit);
25         void addAbort(Abort *abort);
26         void addAborts(Hashset<Abort *> *aborts);
27         Hashset<Abort *> *getAborts();
28         int getAbortsCount();
29         int getCurrentSize();
30         bool isFull();
31         bool getDidSendPart();
32 };
33
34 #endif