Class ConcurrentMultiDataIterator
java.lang.Object
org.openspaces.persistency.support.ConcurrentMultiDataIterator
- All Implemented Interfaces:
DataIterator,Iterator,MultiDataIterator
A simple implementation wrapping several iterators and exposing them as concurrent iterator using
a fixed size thread pool. If a given iterator is a
MultiDataIterator
it will flatten it by getting its respective list of iterators.
Note, this implementation assumes that hasNext() is called before next() is
called. And that next() is called only when hasNext() returns
true.
- Author:
- kimchy
-
Constructor Details
-
ConcurrentMultiDataIterator
-
-
Method Details
-
iterators
Description copied from interface:MultiDataIteratorReturns the underlying iterators. Note, calling this method should only be performed if no iteration has happened.- Specified by:
iteratorsin interfaceMultiDataIterator
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
close
public void close()Description copied from interface:DataIteratorClean up after any resources associated with this iterator The iterator can be closed even if the iterator wasn't iterated over all of its elements.- Specified by:
closein interfaceDataIterator
-