#define TRANSACTION_H
#include "common.h"
#include "Pair.h"
+#include "IoTString.h"
class Transaction {
private:
- Hashtable<int32_t, TransactionPart *> *parts;
+ Vector<TransactionPart *> *parts;
+ uint partCount;
Hashset<int32_t> *missingParts;
Vector<int32_t> *partsPendingSend;
bool fldisComplete;
int64_t clientLocalSequenceNumber;
int64_t arbitratorId;
int64_t machineId;
- Pair<uint64_t, uint64_t> *transactionId;
- int nextPartToSend;
+ Pair<int64_t, int64_t> transactionId;
+ uint32_t nextPartToSend;
bool flddidSendAPartToServer;
TransactionStatus *transactionStatus;
bool hadServerFailure;
int64_t getSequenceNumber();
void setSequenceNumber(int64_t _sequenceNumber);
int64_t getClientLocalSequenceNumber();
- Hashtable<int32_t, TransactionPart *> *getParts();
+ Vector<TransactionPart *> *getParts();
bool didSendAPartToServer();
void resetNextPartToSend();
TransactionPart *getNextPartToSend();
Pair<int64_t, int64_t> *getId();
void setDead();
TransactionPart *getPart(int32_t index);
- bool evaluateGuard(Hashtable<IoTString *, KeyValue *> *committedKeyValueTable, Hashtable<IoTString *, KeyValue *> *speculatedKeyValueTable, Hashtable<IoTString *, KeyValue *> *pendingTransactionSpeculatedKeyValueTable);
+ bool evaluateGuard(Hashtable<IoTString *, KeyValue *, uintptr_t, 0, hashString, StringEquals> *committedKeyValueTable, Hashtable<IoTString *, KeyValue *, uintptr_t, 0, hashString, StringEquals> *speculatedKeyValueTable, Hashtable<IoTString *, KeyValue *, uintptr_t, 0, hashString, StringEquals> *pendingTransactionSpeculatedKeyValueTable);
};
#endif