Package com.linkedin.davinci.store
Class AbstractStorageIterator
- java.lang.Object
-
- com.linkedin.davinci.store.AbstractStorageIterator
-
- Direct Known Subclasses:
RocksDBStorageIterator
public abstract class AbstractStorageIterator extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AbstractStorageIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isValid()
byte[]
key()
void
next()
Moves to the next entryvoid
prev()
Moves to the previous entryvoid
seek(byte[] key)
Seeks to the first entry whose key is greater than or equal to the given keyvoid
seekToFirst()
Seek to the first keyvoid
seekToLast()
Seek to the last keybyte[]
value()
-
-
-
Method Detail
-
isValid
public boolean isValid()
- Returns:
- true if the iterator is valid
-
key
public byte[] key()
- Returns:
- the key of the current entry
-
value
public byte[] value()
- Returns:
- the value of the current entry
-
next
public void next()
Moves to the next entry
-
prev
public void prev()
Moves to the previous entry
-
seek
public void seek(byte[] key)
Seeks to the first entry whose key is greater than or equal to the given key- Parameters:
key
- the key to seek to
-
seekToFirst
public void seekToFirst()
Seek to the first key
-
seekToLast
public void seekToLast()
Seek to the last key
-
-