Class CursorIterator

java.lang.Object
io.permazen.kv.mvstore.CursorIterator
All Implemented Interfaces:
CloseableIterator<KVPair>, Closeable, AutoCloseable, Iterator<KVPair>

@ThreadSafe public class CursorIterator extends Object implements CloseableIterator<KVPair>
KVPair iterator based on an underlying Cursor.

The remove() method is implemented by invoking MVMap.remove(Object).

  • Constructor Details

    • CursorIterator

      public CursorIterator(org.h2.mvstore.MVMap<byte[],byte[]> mvmap, byte[] minKey, byte[] maxKey, boolean reverse)
      Constructor.
      Parameters:
      mvmap - the underlying MVMap (used to implement remove()), or null for read-only operation
      minKey - minimum key (inclusive), or null for no minimum
      maxKey - maximum key (exclusive), or null for no maximum
      reverse - true if cursor iterates keys in descending order
      Throws:
      IllegalArgumentException - if cursor is null
  • Method Details