Module lmdbjava
Package org.lmdbjava

Class CursorIterable<T>

java.lang.Object
org.lmdbjava.CursorIterable<T>
Type Parameters:
T - buffer type
All Implemented Interfaces:
AutoCloseable, Iterable<CursorIterable.KeyVal<T>>

public final class CursorIterable<T> extends Object implements Iterable<CursorIterable.KeyVal<T>>, AutoCloseable
Iterable that creates a single Iterator that will iterate over a Cursor as specified by a KeyRange.

An instance will create and close its own cursor.

If iterating over keys stored with DbiFlags.MDB_INTEGERKEY you must provide a Java comparator when constructing the Dbi or this class. It is more efficient to use a comparator only with this class, as this avoids LMDB calling back into Java code to perform the integer key comparison.