#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;
+ Hashset<Abort *> * abortsBefore;
+ Vector<Entry *> * parts;
+ Commit * commit;
+ int currentSize;
+ bool didSendPart;
+ bool didGenerateParts;
public:
- ArbitrationRound(Commit * _commit, Set<Abort *> * _abortsBefore);
+ ArbitrationRound(Commit * _commit, Hashset<Abort *> * _abortsBefore);
+ ~ArbitrationRound();
void generateParts();
- List<Entry> * getParts();
- void removeParts(List<Entry> * removeParts);
+ Vector<Entry *> * getParts();
+ void removeParts(Vector<Entry *> * removeParts);
bool isDoneSending();
void setCommit(Commit * _commit);
void addAbort(Abort * abort);
- void addAborts(Set<Abort *> * aborts);
- Set<Abort *> * getAborts();
+ void addAborts(Hashset<Abort *> * aborts);
+ Hashset<Abort *> * getAborts();
int getAbortsCount();
int getCurrentSize();
bool isFull();
- bool didSendPart();
+ bool getDidSendPart();
};
#endif