#define ARBITRATIONROUND_H
#define MAX_PARTS 10
+#include "common.h"
class ArbitrationRound {
- private:
- Set<Abort *> * abortsBefore = NULL;
- List<Entry *> * parts = NULL;
- Commit commit = NULL;
- int currentSize = 0;
- bool didSendPart = false;
- bool didGenerateParts = false;
+private:
+ Hashset<Abort *> *abortsBefore;
+ Vector<Entry *> *parts;
+ Commit *commit;
+ int currentSize;
+ bool didSendPart;
+ bool didGenerateParts;
- public:
- ArbitrationRound(Commit * _commit, Set<Abort *> * _abortsBefore);
- void generateParts();
- List<Entry> * getParts();
- void removeParts(List<Entry> * removeParts);
- bool isDoneSending();
- void setCommit(Commit * _commit);
- void addAbort(Abort * abort);
- void addAborts(Set<Abort *> * aborts);
- Set<Abort *> * getAborts();
- int getAbortsCount();
- int getCurrentSize();
- bool isFull();
- bool didSendPart();
+public:
+ ArbitrationRound(Commit *_commit, Hashset<Abort *> *_abortsBefore);
+ ~ArbitrationRound();
+ void generateParts();
+ Commit *getCommit();
+ Vector<Entry *> *getParts();
+ void removeParts(Vector<Entry *> *removeParts);
+ bool isDoneSending();
+ void setCommit(Commit *_commit);
+ void addAbort(Abort *abort);
+ void addAborts(Hashset<Abort *> *aborts);
+ Hashset<Abort *> *getAborts();
+ int getAbortsCount();
+ int getCurrentSize();
+ bool isFull();
+ bool getDidSendPart();
};
#endif