Package de.caluga.morphium.query
Interface MorphiumIterator<T>
- All Known Subinterfaces:
MorphiumAggregationIterator<T,R>
- All Known Implementing Classes:
AggregationIterator,QueryIterator
User: Stephan Bösebeck
Date: 23.11.12
Time: 11:35
iterator, makes paging through huge collections a lot easier. Default Window (~page) size is 10.
This iterator only reads as many objects from mongo as specified in window-size. It can be used like a
normal java iterator:
for (Object o:query.asIterable()) {
//do something here
};
-
Method Summary
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
available
int available()retruns the number of elements now in buffer. Max windowsize- Returns:
- list
-
getCurrentBuffer
get the current buffer. Maximum length is specified windowsize- Returns:
- list
-
getCursor
int getCursor()returns current cursor position- Returns:
- int
-
ahead
void ahead(int jump) move the cursor position ahead- Parameters:
jump- number of elements to jump
-
back
void back(int jump) get back some positions- Parameters:
jump- number of elements to jump back
-
close
void close() -
nextMap
-