|
GridGain 4.3.1e
Enterprise "Big Data" Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridgain.grid.lang.GridIteratorAdapter<T>
org.gridgain.grid.lang.utils.GridCloseableIteratorAdapter<T>
public abstract class GridCloseableIteratorAdapter<T>
Convenient adapter for closeable iterator.

| Constructor Summary | |
|---|---|
GridCloseableIteratorAdapter()
|
|
| Method Summary | |
|---|---|
protected void |
checkClosed()
Throws NoSuchElementException if iterator has been closed. |
void |
close()
Closes the iterator and frees all the resources held by the iterator. |
boolean |
hasNextX()
This method is the same as Iterator.hasNext(), but allows for failure
with exception. |
boolean |
isClosed()
Checks if iterator has been closed. |
T |
nextX()
This method is the same as Iterator.next(), but allows for failure
with exception. |
protected void |
onClose()
Invoked on iterator close. |
protected abstract boolean |
onHasNext()
|
protected abstract T |
onNext()
|
protected void |
onRemove()
Called on remove from iterator. |
void |
removeX()
This method is the same as Iterator.remove(), but allows for failure
with exception. |
| Methods inherited from class org.gridgain.grid.lang.GridIteratorAdapter |
|---|
hasNext, iterator, next, remove |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Methods inherited from interface java.util.Iterator |
|---|
hasNext, next, remove |
| Constructor Detail |
|---|
public GridCloseableIteratorAdapter()
| Method Detail |
|---|
public final T nextX()
throws GridException
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.s
nextX in interface GridIterator<T>GridException - If no more elements can be returned due
to some failure, like a network error for example.
True if iterator contains more elements.Iterator.next()
protected abstract T onNext()
throws GridException
GridException - If failed.
NoSuchElementException - If no element found.
public final boolean hasNextX()
throws GridException
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>GridException - If no more elements can be returned due
to some failure, like a network error for example.
True if iterator contains more elements.Iterator.hasNext()
protected abstract boolean onHasNext()
throws GridException
GridException - If failed.
True if iterator has next element.
public final void removeX()
throws GridException
Iterator.remove(), but allows for failure
with exception.
removeX in interface GridIterator<T>GridException - If failed.
protected void onRemove()
throws GridException
GridException - If failed.
public final void close()
throws GridException
close in interface GridCloseableIterator<T>GridException - In case of error.public boolean isClosed()
isClosed in interface GridCloseableIterator<T>True if iterator has been closed.
protected void onClose()
throws GridException
GridException - If closing failed.
protected final void checkClosed()
throws NoSuchElementException
NoSuchElementException if iterator has been closed.
NoSuchElementException - If iterator has already been closed.
|
GridGain 4.3.1e
Enterprise "Big Data" Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - In-Memory Big Data
|
|
|