GigaSpaces - Open Spaces

org.openspaces.persistency.support
Class SerialMultiDataIterator

java.lang.Object
  extended by org.openspaces.persistency.support.SerialMultiDataIterator
All Implemented Interfaces:
com.gigaspaces.datasource.DataIterator, Iterator, MultiDataIterator

public class SerialMultiDataIterator
extends Object
implements MultiDataIterator

A simple implementation wrapping several iterators and exposing them as a single (serial) iterator.

Note, this implemenation assumes that hasNext() is called before next() is called. And that next() is called only when hasNext() returns true.

Author:
kimchy

Constructor Summary
SerialMultiDataIterator(com.gigaspaces.datasource.DataIterator... iterators)
           
 
Method Summary
 void close()
           
 boolean hasNext()
           
 com.gigaspaces.datasource.DataIterator[] iterators()
          Returns the underlying iterators.
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerialMultiDataIterator

public SerialMultiDataIterator(com.gigaspaces.datasource.DataIterator... iterators)
Method Detail

iterators

public com.gigaspaces.datasource.DataIterator[] iterators()
Description copied from interface: MultiDataIterator
Returns the underlying iterators. Note, calling this method should only be performed if no iteration has happened.

Specified by:
iterators in interface MultiDataIterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

close

public void close()
Specified by:
close in interface com.gigaspaces.datasource.DataIterator

remove

public void remove()
Specified by:
remove in interface Iterator

GigaSpaces - Open Spaces

Copyright © GigaSpaces.