#define TRANSACTION_H
#include "common.h"
#include "Pair.h"
+#include "IoTString.h"
class Transaction {
private:
int64_t arbitratorId;
int64_t machineId;
Pair<int64_t, int64_t> transactionId;
- int nextPartToSend;
+ uint32_t nextPartToSend;
bool flddidSendAPartToServer;
TransactionStatus *transactionStatus;
bool hadServerFailure;
public:
Transaction();
+ ~Transaction();
void addPartEncode(TransactionPart *newPart);
void addPartDecode(TransactionPart *newPart);
void addUpdateKV(KeyValue *kv);
int64_t getMachineId();
int64_t getArbitrator();
bool isComplete();
- Pair<int64_t, int64_t> getId();
+ 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