edits
[iotcloud.git] / version2 / src / C / Commit.h
index 4de3d22e478db8614da689f70ca89aa449841fc2..8084eb7867df037207cdbd9d8677e46afc166173 100644 (file)
@@ -1,21 +1,23 @@
 #ifndef COMMIT_H
 #define COMMIT_H
 #include "common.h"
+#include "KeyValue.h"
 
 class Commit {
 private:
-       Hashtable<int32_t, CommitPart *> *parts;
+       Vector<CommitPart *> *parts;
+       uint32_t partCount;
        Hashset<int32_t> *missingParts;
        bool fldisComplete;
        bool hasLastPart;
-       Hashset<KeyValue *> *keyValueUpdateSet;
+       Hashset<KeyValue *, uintptr_t, 0, hashKeyValue, equalsKeyValue> *keyValueUpdateSet;
        bool isDead;
        int64_t sequenceNumber;
        int64_t machineId;
        int64_t transactionSequenceNumber;
        Hashset<IoTString *> *liveKeys;
        Array<char> *convertDataToBytes();
-       void setKVsMap(Hashtable<IoTString *, KeyValue *> *newKVs);
+       void setKVsMap(Hashset<KeyValue *, uintptr_t, 0, hashKeyValue, equalsKeyValue> *newKVs);
 
 public:
        Commit();
@@ -23,10 +25,10 @@ public:
        void addPartDecode(CommitPart *newPart);
        int64_t getSequenceNumber();
        int64_t getTransactionSequenceNumber();
-       Hashtable<int32_t, CommitPart *> *getParts();
+       Vector<CommitPart *> *getParts();
        void addKV(KeyValue *kv);
        void invalidateKey(IoTString *key);
-       Hashset<KeyValue *> *getKeyValueUpdateSet();
+       Hashset<KeyValue *, uintptr_t, 0, hashKeyValue, equalsKeyValue> *getKeyValueUpdateSet();
        int32_t getNumberOfParts();
        int64_t getMachineId() { return machineId; }
        bool isComplete() { return fldisComplete; }