tabbing
[iotcloud.git] / version2 / src / C / PendingTransaction.h
index 7e60ce865a25adcefebaf34fba9f5df73cfdff83..c036c869bb35a5bd586b5eb29f45380619db78c7 100644 (file)
@@ -4,26 +4,26 @@
 #include "common.h"
 
 class PendingTransaction {
- private:
-       Hashset<KeyValue*> * keyValueUpdateSet = NULL;
-       Hashset<KeyValue*> * keyValueGuardSet = NULL;
-       int64_t arbitrator = -1;
-       int64_t clientLocalSequenceNumber = -1;
-  int64_t machineId = -1;
-       int32_T currentDataSize = 0;
-
- public:
+private:
+       Hashset<KeyValue *> *keyValueUpdateSet;
+       Hashset<KeyValue *> *keyValueGuardSet;
+       int64_t arbitrator;
+       int64_t clientLocalSequenceNumber;
+       int64_t machineId;
+       int32_t currentDataSize;
+
+public:
        PendingTransaction(int64_t _machineId);
        /**
         * Add a new key value to the updates
         *
         */
-       void addKV(KeyValue newKV);
+       void addKV(KeyValue *newKV);
        /**
         * Add a new key value to the guard set
         *
         */
-       void addKVGuard(KeyValue newKV);
+       void addKVGuard(KeyValue *newKV);
        /**
         * Checks if the arbitrator is the same
         */
@@ -35,12 +35,12 @@ class PendingTransaction {
        /**
         * Get the key value update set
         */
-       Hashset<KeyValue*> * getKVUpdates() { return keyValueUpdateSet; }
+       Hashset<KeyValue *> *getKVUpdates() { return keyValueUpdateSet; }
 
        /**
         * Get the key value update set
         */
-       public Hashset<KeyValue *> * getKVGuard() { return keyValueGuardSet; }
+       Hashset<KeyValue *> *getKVGuard() { return keyValueGuardSet; }
 
        void setClientLocalSequenceNumber(int64_t _clientLocalSequenceNumber) { clientLocalSequenceNumber = _clientLocalSequenceNumber; }
 
@@ -48,10 +48,10 @@ class PendingTransaction {
 
        int64_t getMachineId() { return machineId; }
 
-       bool evaluateGuard(Hashtable<IoTString *, KeyValue *> keyValTableCommitted, Hashtable<IoTString *, KeyValue *> keyValTableSpeculative, Hashtable<IoTString *, KeyValue *> keyValTablePendingTransSpeculative);
+       bool evaluateGuard(Hashtable<IoTString *, KeyValue *> *keyValTableCommitted, Hashtable<IoTString *, KeyValue *> *keyValTableSpeculative, Hashtable<IoTString *, KeyValue *> *keyValTablePendingTransSpeculative);
 
-       Transaction * createTransaction();
+       Transaction *createTransaction();
 
-       Array<char> * convertDataToBytes();
+       Array<char> *convertDataToBytes();
 };
 #endif