public class ReadOnlyLmdbIterator
extends java.lang.Object
implements org.ametiste.lib.lmdb.iterator.LmdbIterator
LmdbIterator implementation that provides read-only access to database data.
Iterator opens all required connection by itself and releases them on close() operation.
| Constructor and Description |
|---|
ReadOnlyLmdbIterator(java.lang.String path,
java.lang.String key)
Create new instance of
ReadOnlyLmdbIterator. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
hasNext() |
DefaultLmdbEntry |
next() |
public ReadOnlyLmdbIterator(java.lang.String path,
java.lang.String key)
ReadOnlyLmdbIterator.path - lmdb database path. Must be valid directory.key - starting point of iteration process. If null iteration starts from beginning of database.public void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic boolean hasNext()
hasNext in interface java.util.Iterator<org.ametiste.lib.lmdb.entry.LmdbEntry>public DefaultLmdbEntry next()
next in interface java.util.Iterator<org.ametiste.lib.lmdb.entry.LmdbEntry>