public interface IteratorState
Each IteratorState
instance is coupled to the Key-Value Table that it was created for and is tailored for the
type of iteration that generates it (i.e., KeyValueTable.keyIterator(java.lang.String, int, io.pravega.client.tables.IteratorState)
vs KeyValueTable.entryIterator(java.lang.String, int, io.pravega.client.tables.IteratorState)
).
As such, an IteratorState
instance is non-transferable between different types of iterations or between
different Key-Value Tables. It is OK to pass a IteratorState
generated from a KeyValueTable
instance
to another KeyValueTable
instance for the same Key-Value Table.
Modifier and Type | Method and Description |
---|---|
static IteratorState |
fromBytes(java.nio.ByteBuffer buffer)
Creates a new
IteratorState from the given ByteBuffer . |
boolean |
isEmpty()
Gets a value indicating whether this
IteratorState instance is empty. |
java.nio.ByteBuffer |
toBytes()
Serializes this
IteratorState to a ByteBuffer . |
java.nio.ByteBuffer toBytes()
IteratorState
to a ByteBuffer
. This can later be used to create a new
IteratorState
using fromBytes(ByteBuffer)
.ByteBuffer
.boolean isEmpty()
IteratorState
instance is empty.static IteratorState fromBytes(java.nio.ByteBuffer buffer)
IteratorState
from the given ByteBuffer
.buffer
- A ByteBuffer
created via toBytes()
.IteratorState
.