public class AggregationIterator<T,R> extends Object implements MorphiumAggregationIterator<T,R>
iterating over huge collections using the mongodb internal cursor
| Constructor and Description |
|---|
AggregationIterator() |
| Modifier and Type | Method and Description |
|---|---|
void |
ahead(int jump)
move the cursor position ahead
|
void |
back(int jump)
get back some positions
|
Aggregator<T,R> |
getAggregator() |
long |
getCount()
how many elements are to be processed.
|
List<R> |
getCurrentBuffer()
get the current buffer.
|
int |
getCurrentBufferSize()
retruns the number of elements now in buffer.
|
int |
getCursor()
returns current cursor position
|
int |
getNumberOfAvailableThreads() |
int |
getNumberOfThreads() |
int |
getWindowSize() |
boolean |
hasNext() |
boolean |
isMultithreaddedAccess() |
Iterator<R> |
iterator() |
R |
next() |
void |
setAggregator(Aggregator<T,R> aggregator) |
void |
setMultithreaddedAccess(boolean mu) |
void |
setNumberOfPrefetchWindows(int n) |
void |
setWindowSize(int sz) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorforEachRemaining, removepublic int getWindowSize()
getWindowSize in interface MorphiumIterator<R>public void setWindowSize(int sz)
setWindowSize in interface MorphiumIterator<R>public int getCurrentBufferSize()
MorphiumIteratorgetCurrentBufferSize in interface MorphiumIterator<R>public List<R> getCurrentBuffer()
MorphiumIteratorgetCurrentBuffer in interface MorphiumIterator<R>public long getCount()
MorphiumIteratorgetCount in interface MorphiumIterator<R>public int getCursor()
MorphiumIteratorgetCursor in interface MorphiumIterator<R>public void ahead(int jump)
MorphiumIteratorahead in interface MorphiumIterator<R>jump - number of elements to jumppublic void back(int jump)
MorphiumIteratorback in interface MorphiumIterator<R>jump - number of elements to jump backpublic void setNumberOfPrefetchWindows(int n)
setNumberOfPrefetchWindows in interface MorphiumIterator<R>public int getNumberOfAvailableThreads()
getNumberOfAvailableThreads in interface MorphiumIterator<R>public int getNumberOfThreads()
getNumberOfThreads in interface MorphiumIterator<R>public boolean isMultithreaddedAccess()
isMultithreaddedAccess in interface MorphiumIterator<R>public void setMultithreaddedAccess(boolean mu)
setMultithreaddedAccess in interface MorphiumIterator<R>public Aggregator<T,R> getAggregator()
getAggregator in interface MorphiumAggregationIterator<T,R>public void setAggregator(Aggregator<T,R> aggregator)
setAggregator in interface MorphiumAggregationIterator<T,R>Copyright © 2022. All rights reserved.