HashMap<Long, Pair<Long, Liveness>> lastMessageTable = NULL; // Last message sent by a client machine id -> (Seq Num, Slot or LastMessage);
HashMap<Long, HashSet<RejectedMessage>> rejectedMessageWatchListTable = NULL; // Table of machine Ids and the set of rejected messages they have not seen yet
Map<IoTString, Long> arbitratorTable = NULL; // Table of keys and their arbitrators
HashMap<Long, Pair<Long, Liveness>> lastMessageTable = NULL; // Last message sent by a client machine id -> (Seq Num, Slot or LastMessage);
HashMap<Long, HashSet<RejectedMessage>> rejectedMessageWatchListTable = NULL; // Table of machine Ids and the set of rejected messages they have not seen yet
Map<IoTString, Long> arbitratorTable = NULL; // Table of keys and their arbitrators
Map<Long, Map<Pair<Long, Integer>, TransactionPart>> newTransactionParts = NULL; // transaction parts that are seen in this latest round of slots from the server
Map<Long, Map<Pair<Long, Integer>, CommitPart>> newCommitParts = NULL; // commit parts that are seen in this latest round of slots from the server
Map<Long, Map<Pair<Long, Integer>, TransactionPart>> newTransactionParts = NULL; // transaction parts that are seen in this latest round of slots from the server
Map<Long, Map<Pair<Long, Integer>, CommitPart>> newCommitParts = NULL; // commit parts that are seen in this latest round of slots from the server
- Map<Pair<Long, Long>, Transaction> liveTransactionByTransactionIdTable = NULL; // live transaction grouped by the transaction ID
+ Map<Pair<int64_t, int64_t>, Transaction> liveTransactionByTransactionIdTable = NULL; // live transaction grouped by the transaction ID
Map<Long, Map<Long, Commit>> liveCommitsTable = NULL;
Map<IoTString, Commit> liveCommitsByKeyTable = NULL;
Map<Long, Map<Long, Commit>> liveCommitsTable = NULL;
Map<IoTString, Commit> liveCommitsByKeyTable = NULL;
Vector<Long> rejectedSlotList = NULL; // List of rejected slots that have yet to be sent to the server
List<Transaction> pendingTransactionQueue = NULL;
List<ArbitrationRound> pendingSendArbitrationRounds = NULL;
Vector<Long> rejectedSlotList = NULL; // List of rejected slots that have yet to be sent to the server
List<Transaction> pendingTransactionQueue = NULL;
List<ArbitrationRound> pendingSendArbitrationRounds = NULL;
Map<Transaction, List<Integer>> transactionPartsSent = NULL;
Map<Long, TransactionStatus> outstandingTransactionStatus = NULL;
Map<Long, Abort> liveAbortsGeneratedByLocal = NULL;
Map<Transaction, List<Integer>> transactionPartsSent = NULL;
Map<Long, TransactionStatus> outstandingTransactionStatus = NULL;
Map<Long, Abort> liveAbortsGeneratedByLocal = NULL;
- Map<Long, Long> lastTransactionSeenFromMachineFromServer = NULL;
- Map<Long, Long> lastArbitrationDataLocalSequenceNumberSeenFromArbitrator = NULL;
+ Map<int64_t, int64_t> lastTransactionSeenFromMachineFromServer = NULL;
+ Map<int64_t, int64_t> lastArbitrationDataLocalSequenceNumberSeenFromArbitrator = NULL;
Table(String baseurl, String password, int64_t _localMachineId, int listeningPort) {
Table(String baseurl, String password, int64_t _localMachineId, int listeningPort) {
lastMessageTable = new HashMap<Long, Pair<Long, Liveness>>();
rejectedMessageWatchListTable = new HashMap<Long, HashSet<RejectedMessage>>();
arbitratorTable = new HashMap<IoTString, Long>();
lastMessageTable = new HashMap<Long, Pair<Long, Liveness>>();
rejectedMessageWatchListTable = new HashMap<Long, HashSet<RejectedMessage>>();
arbitratorTable = new HashMap<IoTString, Long>();
newTransactionParts = new HashMap<Long, Map<Pair<Long, Integer>, TransactionPart>>();
newCommitParts = new HashMap<Long, Map<Pair<Long, Integer>, CommitPart>>();
newTransactionParts = new HashMap<Long, Map<Pair<Long, Integer>, TransactionPart>>();
newCommitParts = new HashMap<Long, Map<Pair<Long, Integer>, CommitPart>>();
liveCommitsTable = new HashMap<Long, Map<Long, Commit>>();
liveCommitsByKeyTable = new HashMap<IoTString, Commit>();
liveCommitsTable = new HashMap<Long, Map<Long, Commit>>();
liveCommitsByKeyTable = new HashMap<IoTString, Commit>();
rejectedSlotList = new Vector<Long>();
pendingTransactionQueue = new ArrayList<Transaction>();
pendingSendArbitrationEntriesToDelete = new ArrayList<Entry>();
transactionPartsSent = new HashMap<Transaction, List<Integer>>();
outstandingTransactionStatus = new HashMap<Long, TransactionStatus>();
liveAbortsGeneratedByLocal = new HashMap<Long, Abort>();
rejectedSlotList = new Vector<Long>();
pendingTransactionQueue = new ArrayList<Transaction>();
pendingSendArbitrationEntriesToDelete = new ArrayList<Entry>();
transactionPartsSent = new HashMap<Transaction, List<Integer>>();
outstandingTransactionStatus = new HashMap<Long, TransactionStatus>();
liveAbortsGeneratedByLocal = new HashMap<Long, Abort>();
- Transaction transactionToSetDead = liveTransactionByTransactionIdTable.remove(new Pair<Long, Long>(entry.getTransactionMachineId(), entry.getTransactionClientLocalSequenceNumber()));
+ Transaction transactionToSetDead = liveTransactionByTransactionIdTable.remove(new Pair<int64_t, int64_t>(entry.getTransactionMachineId(), entry.getTransactionClientLocalSequenceNumber()));
if (transactionToSetDead != NULL) {
liveTransactionBySequenceNumberTable.remove(transactionToSetDead.getSequenceNumber());
}
if (transactionToSetDead != NULL) {
liveTransactionBySequenceNumberTable.remove(transactionToSetDead.getSequenceNumber());
}
- for (Iterator<Map.Entry<Pair<Long, Long>, Abort>> i = liveAbortTable.entrySet().iterator(); i.hasNext();) {
+ for (Iterator<Map.Entry<Pair<int64_t, int64_t>, Abort>> i = liveAbortTable.entrySet().iterator(); i.hasNext();) {
Abort abort = i.next().getValue();
if ((abort.getTransactionMachineId() == machineId) && (abort.getSequenceNumber() <= seqNum)) {
Abort abort = i.next().getValue();
if ((abort.getTransactionMachineId() == machineId) && (abort.getSequenceNumber() <= seqNum)) {