edits
[iotcloud.git] / version2 / src / C / Transaction.h
index d04e47f79c78fb50721bb75344f2e9a021af5cc6..ad3a341d27b9a2a0e72c34ff6de9fa3556939c75 100644 (file)
@@ -1,27 +1,29 @@
-
+#ifndef TRANSACTION_H
+#define TRANSACTION_H
+#include "common.h"
 
 class Transaction {
 
 class Transaction {
-
-    private Map<Integer, TransactionPart> parts = NULL;
-    private Set<Integer> missingParts = NULL;
-    private List<Integer> partsPendingSend = NULL;
-    private bool isComplete = false;
-    private bool hasLastPart = false;
-    private Set<KeyValue> keyValueGuardSet = NULL;
-    private Set<KeyValue> keyValueUpdateSet = NULL;
-    private bool isDead = false;
-    private int64_t sequenceNumber = -1;
-    private int64_t clientLocalSequenceNumber = -1;
-    private int64_t arbitratorId = -1;
-    private int64_t machineId = -1;
-    private Pair<Long, Long> transactionId = NULL;
-
-    private int nextPartToSend = 0;
-    private bool didSendAPartToServer = false;
-
-    private TransactionStatus transactionStatus = NULL;
-
   private bool hadServerFailure = false;
+ private:
+       Hashtable<int32_t, TransactionPart *> parts = NULL;
+       Set<int32_t> missingParts = NULL;
+       List<int32_t> partsPendingSend = NULL;
+  bool isComplete = false;
+  bool hasLastPart = false;
+       Hashset<KeyValue *> * keyValueGuardSet = NULL;
+       Hashset<KeyValue *> * keyValueUpdateSet = NULL;
+       bool isDead = false;
+  int64_t sequenceNumber = -1;
+       int64_t clientLocalSequenceNumber = -1;
+       int64_t arbitratorId = -1;
+       int64_t machineId = -1;
+       Pair<uint64_t, uint64_t> transactionId = NULL;
+       
+  int nextPartToSend = 0;
+       bool didSendAPartToServer = false;
+       
+  TransactionStatus transactionStatus = NULL;
+
+ bool hadServerFailure = false;
 
     public Transaction() {
         parts = new HashMap<Integer, TransactionPart>();
 
     public Transaction() {
         parts = new HashMap<Integer, TransactionPart>();
@@ -297,4 +299,5 @@ class Transaction {
         }
         return true;
     }
         }
         return true;
     }
-}
+};
+#endif