Package de.caluga.morphium.aggregation
Class AggregationIterator<T,R>
java.lang.Object
de.caluga.morphium.aggregation.AggregationIterator<T,R>
- All Implemented Interfaces:
MorphiumAggregationIterator<T,,R> MorphiumIterator<R>,Iterable<R>,Iterator<R>
User: Stephan Bösebeck
Date: 25.03.16
Time: 22:33
iterating over huge collections using the mongodb internal cursor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidahead(int jump) move the cursor position aheadintretruns the number of elements now in buffer.voidback(int jump) get back some positionsvoidclose()Aggregator<T,R> get the current buffer.intreturns current cursor positionbooleanhasNext()iterator()next()nextMap()voidsetAggregator(Aggregator<T, R> aggregator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
AggregationIterator
public AggregationIterator()
-
-
Method Details
-
ahead
public void ahead(int jump) Description copied from interface:MorphiumIteratormove the cursor position ahead- Specified by:
aheadin interfaceMorphiumIterator<T>- Parameters:
jump- number of elements to jump
-
back
public void back(int jump) Description copied from interface:MorphiumIteratorget back some positions- Specified by:
backin interfaceMorphiumIterator<T>- Parameters:
jump- number of elements to jump back
-
available
public int available()Description copied from interface:MorphiumIteratorretruns the number of elements now in buffer. Max windowsize- Specified by:
availablein interfaceMorphiumIterator<T>- Returns:
- list
-
iterator
-
hasNext
public boolean hasNext() -
nextMap
- Specified by:
nextMapin interfaceMorphiumIterator<T>
-
next
-
getCurrentBuffer
Description copied from interface:MorphiumIteratorget the current buffer. Maximum length is specified windowsize- Specified by:
getCurrentBufferin interfaceMorphiumIterator<T>- Returns:
- list
-
close
public void close()- Specified by:
closein interfaceMorphiumIterator<T>
-
getCursor
public int getCursor()Description copied from interface:MorphiumIteratorreturns current cursor position- Specified by:
getCursorin interfaceMorphiumIterator<T>- Returns:
- int
-
getAggregator
- Specified by:
getAggregatorin interfaceMorphiumAggregationIterator<T,R>
-
setAggregator
- Specified by:
setAggregatorin interfaceMorphiumAggregationIterator<T,R>
-