edits
[iotcloud.git] / version2 / src / C / Table.h
index a97d12490e0da627cb244d32d537ca9d07ce3bd5..99abb55faf25417ed493280873f6e6d62c58d77a 100644 (file)
@@ -60,10 +60,10 @@ private:
 
 
        /* Data Structures  */
-       Hashtable<IoTString *, KeyValue *> *committedKeyValueTable;// Table of committed key value pairs
-       Hashtable<IoTString *, KeyValue *> *speculatedKeyValueTable;    // Table of speculated key value pairs, if there is a speculative value
-       Hashtable<IoTString *, KeyValue *> *pendingTransactionSpeculatedKeyValueTable;  // Table of speculated key value pairs, if there is a speculative value from the pending transactions
-       Hashtable<IoTString *, NewKey *> *liveNewKeyTable;      // Table of live new keys
+       Hashtable<IoTString *, KeyValue *, uintptr_t, 0, hashString, StringEquals> *committedKeyValueTable;// Table of committed key value pairs
+       Hashtable<IoTString *, KeyValue *, uintptr_t, 0, hashString, StringEquals> *speculatedKeyValueTable;    // Table of speculated key value pairs, if there is a speculative value
+       Hashtable<IoTString *, KeyValue *, uintptr_t, 0, hashString, StringEquals> *pendingTransactionSpeculatedKeyValueTable;  // Table of speculated key value pairs, if there is a speculative value from the pending transactions
+       Hashtable<IoTString *, NewKey *, uintptr_t, 0, hashString, StringEquals> *liveNewKeyTable;      // Table of live new keys
        Hashtable<int64_t, Pair<int64_t, Liveness *> *> *lastMessageTable;      // Last message sent by a client machine id -> (Seq Num, Slot or LastMessage);
        Hashtable<int64_t, Hashset<RejectedMessage *> *> *rejectedMessageWatchVectorTable;      // Table of machine Ids and the set of rejected messages they have not seen yet
        Hashtable<IoTString *, int64_t, uintptr_t, 0, hashString, StringEquals> *arbitratorTable;// Table of keys and their arbitrators
@@ -74,7 +74,7 @@ private:
        Hashtable<int64_t, Transaction *> *liveTransactionBySequenceNumberTable;        // live transaction grouped by the sequence number
        Hashtable<Pair<int64_t, int64_t> *, Transaction *, uintptr_t, 0, pairHashFunction, pairEquals> *liveTransactionByTransactionIdTable;    // live transaction grouped by the transaction ID
        Hashtable<int64_t, Hashtable<int64_t, Commit *> *> *liveCommitsTable;
-       Hashtable<IoTString *, Commit *> *liveCommitsByKeyTable;
+       Hashtable<IoTString *, Commit *, uintptr_t, 0, hashString, StringEquals> *liveCommitsByKeyTable;
        Hashtable<int64_t, int64_t> *lastCommitSeenSequenceNumberByArbitratorTable;
        Vector<int64_t> *rejectedSlotVector;    // Vector of rejected slots that have yet to be sent to the server
        Vector<Transaction *> *pendingTransactionQueue;
@@ -97,9 +97,10 @@ private:
         */
        void setResizeThreshold();
        bool sendToServer(NewKey *newKey);
+       NewKey * handlePartialSend(NewKey * newKey);
        bool updateFromLocal(int64_t machineId);
        Pair<bool, bool> sendTransactionToLocal(Transaction *transaction);
-       ThreeTuple<bool, bool, Array<Slot *> *> sendSlotsToServer(Slot *slot, int newSize, bool isNewKey);
+       bool sendSlotsToServer(Slot *slot, int newSize, bool isNewKey, bool * wasInserted, Array<Slot *> **array);
        /**
         * Returns false if a resize was needed
         */