Class PrefetchIterator<K>
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.query.PrefetchIterator<K>
-
- Type Parameters:
K
- the iterator data type
- All Implemented Interfaces:
Iterator<K>
public class PrefetchIterator<K> extends Object implements Iterator<K>
An iterator that pre-fetches a number of items in order to calculate the size of the result if possible. This iterator loads at least a number of items, and then tries to load some more items until the timeout is reached or the maximum number of entries are read.Prefetching is only done when size() is called.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PrefetchIterator.PrefetchOptions
The options to use for prefetching.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
K
next()
void
remove()
long
size()
Get the size if known.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-