Class IndexQueryReducer<R>
- java.lang.Object
-
- org.apache.ignite.internal.util.lang.GridIteratorAdapter<T>
-
- org.apache.ignite.internal.processors.cache.query.reducer.CacheQueryReducer<R>
-
- org.apache.ignite.internal.processors.cache.query.reducer.IndexQueryReducer<R>
-
- All Implemented Interfaces:
Serializable,Iterable<R>,Iterator<R>,GridSerializableIterator<R>,GridIterator<R>
public class IndexQueryReducer<R> extends CacheQueryReducer<R>
Reducer forIndexQueryresults.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.query.reducer.CacheQueryReducer
pageStreams
-
-
Constructor Summary
Constructors Constructor Description IndexQueryReducer(String valType, Map<UUID,NodePageStream<R>> pageStreams, GridCacheContext<?,?> cctx, CompletableFuture<IndexQueryResultMeta> meta)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNextX()This method is the same asIterator.hasNext(), but allows for failure with exception.RnextX()This method is the same asIterator.next(), but allows for failure with exception.protected CompletableFuture<Comparator<NodePage<R>>>pageComparator()-
Methods inherited from class org.apache.ignite.internal.processors.cache.query.reducer.CacheQueryReducer
get, removeX
-
Methods inherited from class org.apache.ignite.internal.util.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
forEach, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
IndexQueryReducer
public IndexQueryReducer(String valType, Map<UUID,NodePageStream<R>> pageStreams, GridCacheContext<?,?> cctx, CompletableFuture<IndexQueryResultMeta> meta)
-
-
Method Detail
-
pageComparator
protected CompletableFuture<Comparator<NodePage<R>>> pageComparator()
- Returns:
- Comparator for pages from nodes.
-
hasNextX
public boolean hasNextX() throws IgniteCheckedExceptionThis method is the same asIterator.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 returningfalseout ofIterator.hasNext()method.- Returns:
Trueif iterator contains more elements.- Throws:
IgniteCheckedException- If no more elements can be returned due to some failure, like a network error for example.- See Also:
Iterator.hasNext()
-
nextX
public R nextX() throws IgniteCheckedExceptionThis method is the same asIterator.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 throwingNoSuchElementExceptionruntime exception.s- Returns:
Trueif iterator contains more elements.- Throws:
IgniteCheckedException- If no more elements can be returned due to some failure, like a network error for example.- See Also:
Iterator.next()
-
-