Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
alshabib
2014-11-29 15:29:15 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
978d2417da774efd927566ce9c56ecb38d34f4cc
978d2417
1 parent
c1cc81c3
add iterator support to SQueue
Change-Id: I83df62326e54368e40fa15df522c05ba2dc67ff6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
core/store/dist/src/main/java/org/onlab/onos/store/hz/SQueue.java
core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentBatchQueue.java
core/store/dist/src/main/java/org/onlab/onos/store/hz/SQueue.java
View file @
978d241
...
...
@@ -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 org.onlab.onos.store.serializers.StoreSerializer;
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 @@ public class SQueue<T> implements IQueue<T> {
@Override
public
Iterator
<
T
>
iterator
()
{
throw
new
UnsupportedOperationException
();
List
<
T
>
list
=
Lists
.
newArrayList
();
q
.
forEach
(
elem
->
list
.
add
(
deserialize
(
elem
)));
return
list
.
iterator
();
}
@Override
...
...
core/store/dist/src/main/java/org/onlab/onos/store/intent/impl/HazelcastIntentBatchQueue.java
View file @
978d241
...
...
@@ -47,6 +47,7 @@ import java.util.Collections;
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
;
...
...
Please
register
or
login
to post a comment