Adding a feature to read all keys and their respective values (Java side).
[iotcloud.git] / version2 / src / java / iotcloud / Table.java
index e4461523c02bf3d5d9f82827a00fdd648c032af7..6a05197fe3d68a6129c81601eaec02ef10a05650 100644 (file)
@@ -299,6 +299,11 @@ final public class Table {
        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);
@@ -2745,4 +2750,4 @@ final public class Table {
                                throw new Error("Server Error: Invalid HMAC Chain" + currSlot + " " + prevSlot);
                }
        }
-}
\ No newline at end of file
+}