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
+}
--- /dev/null
+import iotcloud.*;
+import java.util.Set;
+import java.util.HashSet;
+
+class Read {
+ public static void main(String[] args) throws Exception {
+
+
+ Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 41567, -1);
+ // t1.initTable();
+ t1.rebuild();
+
+ Set<IoTString> keySet = t1.getKeys();
+ for(IoTString key : keySet) {
+ System.out.print("Key: " + key.toString() + " -> ");
+ IoTString val = t1.getCommitted(key);
+ System.out.println("Value: " + val.toString());
+ }
+ }
+}