Schnittstelle MorphiumIterator<T>

Alle Superschnittstellen:
Iterable<T>, Iterator<T>
Alle bekannten Unterschnittstellen:
MorphiumAggregationIterator<T,R>
Alle bekannten Implementierungsklassen:
AggregationIterator, QueryIterator

public interface MorphiumIterator<T> extends Iterable<T>, Iterator<T>
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 };

  • Methodendetails

    • available

      int available()
      retruns the number of elements now in buffer. Max windowsize
      Gibt zurück:
      list
    • getCurrentBuffer

      List<T> getCurrentBuffer()
      get the current buffer. Maximum length is specified windowsize
      Gibt zurück:
      list
    • getCursor

      int getCursor()
      returns current cursor position
      Gibt zurück:
      int
    • ahead

      void ahead(int jump)
      move the cursor position ahead
      Parameter:
      jump - number of elements to jump
    • back

      void back(int jump)
      get back some positions
      Parameter:
      jump - number of elements to jump back
    • close

      void close()
    • nextMap

      Map<String,Object> nextMap()