add iterator support to SQueue

Change-Id: I83df62326e54368e40fa15df522c05ba2dc67ff6
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/hz/SQueue.java b/core/store/dist/src/main/java/org/onlab/onos/store/hz/SQueue.java
index f560cd2..29aced1 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/hz/SQueue.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/hz/SQueue.java
@@ -15,6 +15,7 @@
  */
 package org.onlab.onos.store.hz;
 
+import com.google.common.collect.Lists;
 import com.hazelcast.core.IQueue;
 import com.hazelcast.core.ItemListener;
 import com.hazelcast.monitor.LocalQueueStats;
@@ -22,6 +23,7 @@
 
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -145,7 +147,9 @@
 
     @Override
     public Iterator<T> iterator() {
-        throw new UnsupportedOperationException();
+        List<T> list = Lists.newArrayList();
+        q.forEach(elem -> list.add(deserialize(elem)));
+        return list.iterator();
     }
 
     @Override
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentBatchQueue.java b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentBatchQueue.java
index 5e9499a..b75e6a4 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentBatchQueue.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentBatchQueue.java
@@ -47,6 +47,7 @@
 import java.util.Map;
 import java.util.Set;
 
+
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.base.Preconditions.checkState;
 import static org.slf4j.LoggerFactory.getLogger;