currentSize += abortsBefore->size();
}
-/*
- void ArbitrationRound::generateParts() {
- if (didGenerateParts) {
- return;
- }
- parts = new Vector<Entry *>((Vector<Entry *> *)abortsBefore);
- if (commit != NULL) {
- parts->addAll(commit->getParts()->values());
- }
- }*/
+ArbitrationRound::~ArbitrationRound() {
+ delete abortsBefore;
+ delete parts;
+}
Vector<Entry *> *ArbitrationRound::getParts() {
return parts;
}
-/*
- void ArbitrationRound::removeParts(Vector<Entry *> * removeParts) {
- parts->removeAll(removeParts);
- didSendPart = true;
- }
- */
-
bool ArbitrationRound::isDoneSending() {
if ((commit == NULL) && abortsBefore->isEmpty()) {
return true;
}
-
return parts->isEmpty();
}
}
bool ArbitrationRound::isFull() {
- return currentSize >= MAX_PARTS;
+ return currentSize >= ArbitrationRound_MAX_PARTS;
}
bool ArbitrationRound::getDidSendPart() {
return didSendPart;
}
-