edits
[iotcloud.git] / version2 / src / C / PendingTransaction.cc
index b1f6db3b2a21b44d2a339d0a889cb0886f2cf60b..f4532190bca1e43d490cc4717c200f1827c1a98d 100644 (file)
@@ -27,7 +27,7 @@ void PendingTransaction::addKV(KeyValue *newKV) {
        KeyValue *rmKV = NULL;
 
        // Make sure there are no duplicates
-       SetIterator<KeyValue *> *kvit = keyValueUpdateSet->iterator();
+       SetIterator<KeyValue *, KeyValue *> *kvit = keyValueUpdateSet->iterator();
        while (kvit->hasNext()) {
                KeyValue *kv = kvit->next();
                if (kv->getKey()->equals(newKV->getKey())) {
@@ -71,7 +71,7 @@ bool PendingTransaction::checkArbitrator(int64_t arb) {
 }
 
 bool PendingTransaction::evaluateGuard(Hashtable<IoTString *, KeyValue *> *keyValTableCommitted, Hashtable<IoTString *, KeyValue *> *keyValTableSpeculative, Hashtable<IoTString *, KeyValue *> *keyValTablePendingTransSpeculative) {
-       SetIterator<KeyValue *> *kvit = keyValueGuardSet->iterator();
+       SetIterator<KeyValue *, KeyValue *> *kvit = keyValueGuardSet->iterator();
        while (kvit->hasNext()) {
                KeyValue *kvGuard = kvit->next();
                // First check if the key is in the speculative table, this is the
@@ -139,7 +139,7 @@ Transaction *PendingTransaction::createTransaction() {
        }
 
        // Add the Guard Conditions
-       SetIterator<KeyValue *> *kvit = keyValueGuardSet->iterator();
+       SetIterator<KeyValue *, KeyValue *> *kvit = keyValueGuardSet->iterator();
        while (kvit->hasNext()) {
                KeyValue *kv = kvit->next();
                newTransaction->addGuardKV(kv);
@@ -170,7 +170,7 @@ Array<char> *PendingTransaction::convertDataToBytes() {
        bbEncode->putInt(keyValueUpdateSet->size());
 
        // Encode all the guard conditions
-       SetIterator<KeyValue *> *kvit = keyValueGuardSet->iterator();
+       SetIterator<KeyValue *, KeyValue *> *kvit = keyValueGuardSet->iterator();
        while (kvit->hasNext()) {
                KeyValue *kv = kvit->next();
                kv->encode(bbEncode);