#include "common.h"
class PendingTransaction {
- private:
- Hashset<KeyValue*> * keyValueUpdateSet = NULL;
- Hashset<KeyValue*> * keyValueGuardSet = NULL;
+private:
+ Hashset<KeyValue *> *keyValueUpdateSet = NULL;
+ Hashset<KeyValue *> *keyValueGuardSet = NULL;
int64_t arbitrator = -1;
int64_t clientLocalSequenceNumber = -1;
- int64_t machineId = -1;
+ int64_t machineId = -1;
int32_T currentDataSize = 0;
- public:
+public:
PendingTransaction(int64_t _machineId);
/**
* Add a new key value to the updates
/**
* 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; }
+ public Hashset<KeyValue *> *getKVGuard() { return keyValueGuardSet; }
void setClientLocalSequenceNumber(int64_t _clientLocalSequenceNumber) { clientLocalSequenceNumber = _clientLocalSequenceNumber; }
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