Package org.iq80.leveldb.impl
Class SeekingIteratorAdapter
java.lang.Object
org.iq80.leveldb.impl.SeekingIteratorAdapter
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<Map.Entry<byte[],,byte[]>> DBIterator
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicBooleanprivate final SnapshotSeekingIterator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate SeekingIteratorAdapter.DbEntryvoidclose()booleanhasNext()booleanhasPrev()next()peekNext()Returns the next element in the iteration, without advancing the iteration.peekPrev()prev()voidremove()voidseek(byte[] targetKey) Repositions the iterator so the key of the next BlockElement returned greater than or equal to the specified targetKey.voidRepositions the iterator so is is at the beginning of the Database.voidRepositions the iterator so it is at the end of of the Database.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
seekingIterator
-
closed
-
-
Constructor Details
-
SeekingIteratorAdapter
-
-
Method Details
-
seekToFirst
public void seekToFirst()Description copied from interface:DBIteratorRepositions the iterator so is is at the beginning of the Database.- Specified by:
seekToFirstin interfaceDBIterator
-
seek
public void seek(byte[] targetKey) Description copied from interface:DBIteratorRepositions the iterator so the key of the next BlockElement returned greater than or equal to the specified targetKey.- Specified by:
seekin interfaceDBIterator
-
hasNext
public boolean hasNext() -
next
-
peekNext
Description copied from interface:DBIteratorReturns the next element in the iteration, without advancing the iteration.- Specified by:
peekNextin interfaceDBIterator
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
remove
public void remove() -
adapt
-
seekToLast
public void seekToLast()Description copied from interface:DBIteratorRepositions the iterator so it is at the end of of the Database.- Specified by:
seekToLastin interfaceDBIterator
-
hasPrev
public boolean hasPrev()- Specified by:
hasPrevin interfaceDBIterator- Returns:
- true if there is a previous entry in the iteration.
-
prev
- Specified by:
previn interfaceDBIterator- Returns:
- the previous element in the iteration and rewinds the iteration.
-
peekPrev
- Specified by:
peekPrevin interfaceDBIterator- Returns:
- the previous element in the iteration, without rewinding the iteration.
-