edits
[iotcloud.git] / version2 / src / C / Transaction.h
index f18bd70f6e0db72add125e1370a3f7e94ccaff7e..08eebea1b656f80bf9ec3108935d461e78168779 100644 (file)
@@ -2,10 +2,12 @@
 #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;
@@ -17,8 +19,8 @@ private:
        int64_t clientLocalSequenceNumber;
        int64_t arbitratorId;
        int64_t machineId;
-       Pair<int64_t, int64_t> *transactionId;
-       int nextPartToSend;
+       Pair<int64_t, int64_t> transactionId;
+       uint32_t nextPartToSend;
        bool flddidSendAPartToServer;
        TransactionStatus *transactionStatus;
        bool hadServerFailure;
@@ -33,7 +35,7 @@ public:
        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();
@@ -52,6 +54,6 @@ public:
        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