public class GridIterableAdapter<T> extends Object implements GridIterable<T>
| Constructor and Description |
|---|
GridIterableAdapter(Iterator<T> impl)
Creates adapter with given iterator implementation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
boolean |
hasNextX()
This method is the same as
Iterator.hasNext(), but allows for failure
with exception. |
GridIterator<T> |
iterator()
Returns
GridIterator which extends regular Iterator interface
and adds methods that account for possible failures in cases when iterating
over data that has been partially received over network. |
T |
next() |
T |
nextX()
This method is the same as
Iterator.next(), but allows for failure
with exception. |
void |
remove() |
void |
removeX()
This method is the same as
Iterator.remove(), but allows for failure
with exception. |
String |
toString() |
public GridIterator<T> iterator()
GridIterator which extends regular Iterator interface
and adds methods that account for possible failures in cases when iterating
over data that has been partially received over network.iterator in interface Iterable<T>iterator in interface GridIterable<T>GridIterator.public boolean hasNextX()
throws IgniteCheckedException
Iterator.hasNext(), but allows for failure
with exception. Often iterators are used to iterate through values
that have not or have partially been received from remote nodes,
and need to account for possible network failures, rather than
just returning false out of Iterator.hasNext() method.hasNextX in interface GridIterator<T>True if iterator contains more elements.IgniteCheckedException - If no more elements can be returned due
to some failure, like a network error for example.Iterator.hasNext()public T nextX() throws IgniteCheckedException
Iterator.next(), but allows for failure
with exception. Often iterators are used to iterate through values
that have not or have partially been received from remote nodes,
and need to account for possible network failures, rather than
throwing NoSuchElementException runtime exception.snextX in interface GridIterator<T>True if iterator contains more elements.IgniteCheckedException - If no more elements can be returned due
to some failure, like a network error for example.Iterator.next()public void removeX()
throws IgniteCheckedException
Iterator.remove(), but allows for failure
with exception.removeX in interface GridIterator<T>IgniteCheckedException - If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.2.0-incubating Release Date : June 16 2015