private int numberOfSlots = 0; // Number of slots stored in buffer
private int bufferResizeThreshold = 0; // Threshold on the number of live slots before a resize is needed
private long liveSlotCount = 0; // Number of currently live slots
- private long oldestLiveSlotSequenceNumver = 0; // Smallest sequence number of the slot with a live entry
+ private long oldestLiveSlotSequenceNumver = 1; // Smallest sequence number of the slot with a live entry
private long localMachineId = 0; // Machine ID of this client device
private long sequenceNumber = 0; // Largest sequence number a client has received
private long localSequenceNumber = 0;
// private int smallestTableStatusSeen = -1; // Smallest Table Status that was seen in the latest slots sent from the server
// private int largestTableStatusSeen = -1; // Largest Table Status that was seen in the latest slots sent from the server
- private long localTransactionSequenceNumber = 0; // Local sequence number counter for transactions
- private long lastTransactionSequenceNumberSpeculatedOn = -1; // the last transaction that was speculated on
- private long oldestTransactionSequenceNumberSpeculatedOn = -1; // the oldest transaction that was speculated on
- private long localArbitrationSequenceNumber = 0;
+ private long localTransactionSequenceNumber = 1; // Local sequence number counter for transactions
+ private long lastTransactionSequenceNumberSpeculatedOn = 0; // the last transaction that was speculated on
+ private long oldestTransactionSequenceNumberSpeculatedOn = 0; // the oldest transaction that was speculated on
+ private long localArbitrationSequenceNumber = 1;
private boolean hadPartialSendToServer = false;
private boolean attemptedToSendToServer = false;
private long expectedsize;
public synchronized void close() {
cloud.close();
}
+
+ // Return all keys in the table
+ public synchronized Set<IoTString> getKeys() {
+ return committedKeyValueTable.keySet();
+ }
public synchronized IoTString getCommitted(IoTString key) {
KeyValue kv = committedKeyValueTable.get(key);
throw new Error("Server Error: Invalid HMAC Chain" + currSlot + " " + prevSlot);
}
}
-}
\ No newline at end of file
+}