public class IgniteRebalanceIteratorImpl extends Object implements IgniteRebalanceIterator
| Constructor and Description |
|---|
IgniteRebalanceIteratorImpl(NavigableMap<Integer,GridCloseableIterator<CacheDataRow>> fullIterators,
IgniteHistoricalIterator historicalIterator) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the iterator and frees all the resources held by the iterator.
|
boolean |
hasNext() |
boolean |
hasNextX()
This method is the same as
Iterator.hasNext(), but allows for failure
with exception. |
boolean |
historical(int partId) |
boolean |
isClosed()
Checks if iterator has been closed.
|
boolean |
isPartitionDone(int partId) |
boolean |
isPartitionMissing(int partId) |
Iterator<CacheDataRow> |
iterator() |
CacheDataRow |
next() |
CacheDataRow |
nextX()
This method is the same as
Iterator.next(), but allows for failure
with exception. |
CacheDataRow |
peek()
Return next element without moving iterator cursor to the next one.
|
void |
remove() |
void |
removeX()
This method is the same as
Iterator.remove(), but allows for failure
with exception. |
void |
setPartitionMissing(int partId)
Marks partition as missing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorforEachRemainingpublic IgniteRebalanceIteratorImpl(NavigableMap<Integer,GridCloseableIterator<CacheDataRow>> fullIterators, IgniteHistoricalIterator historicalIterator) throws IgniteCheckedException
fullIterators - historicalIterator - IgniteCheckedExceptionpublic boolean historical(int partId)
historical in interface IgniteRebalanceIteratorTrue if this iterator is a historical iterator starting from the requested partition counter.public boolean isPartitionDone(int partId)
isPartitionDone in interface IgniteRebalanceIteratorpartId - Partition ID.True if all data for given partition was already returned.public boolean isPartitionMissing(int partId)
isPartitionMissing in interface IgniteRebalanceIteratorpartId - Partition ID.True if partition was marked as missing.public void setPartitionMissing(int partId)
setPartitionMissing in interface IgniteRebalanceIteratorpartId - Partition ID.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<CacheDataRow>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 CacheDataRow 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<CacheDataRow>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 CacheDataRow peek()
peek in interface IgniteRebalanceIteratorNull if there is no more elements.public void removeX()
throws IgniteCheckedException
Iterator.remove(), but allows for failure
with exception.removeX in interface GridIterator<CacheDataRow>IgniteCheckedException - If failed.public void close()
throws IgniteCheckedException
The method is invoked automatically on objects managed by the
try-with-resources statement.
close in interface AutoCloseableclose in interface GridCloseableIterator<CacheDataRow>close in interface IgniteSpiCloseableIterator<CacheDataRow>IgniteCheckedException - In case of error.public boolean isClosed()
isClosed in interface GridCloseableIterator<CacheDataRow>True if iterator has been closed.public Iterator<CacheDataRow> iterator()
iterator in interface Iterable<CacheDataRow>public boolean hasNext()
hasNext in interface Iterator<CacheDataRow>public CacheDataRow next()
next in interface Iterator<CacheDataRow>public void remove()
remove in interface Iterator<CacheDataRow>
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020