Package io.pravega.client.tables
Interface KeyValueTableIterator
-
@Beta public interface KeyValueTableIteratorDefines a preconfigured Iterator for aKeyValueTable, which can be used to iterate overTableKeyorTableEntryinstances. SeeKeyValueTableIterator.Builderfor configuring, andkeys()andentries()for running.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceKeyValueTableIterator.BuilderDefines a Builder for aKeyValueTableIterator.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.pravega.common.util.AsyncIterator<IteratorItem<TableEntry>>entries()Creates a new Iterator overTableEntryinstances in the associatedKeyValueTable.io.pravega.common.util.AsyncIterator<IteratorItem<TableKey>>keys()Creates a new Iterator forTableKeys in the associatedKeyValueTable.
-
-
-
Method Detail
-
keys
io.pravega.common.util.AsyncIterator<IteratorItem<TableKey>> keys()
Creates a new Iterator forTableKeys in the associatedKeyValueTable. This is preferred toentries()if all that is needed is theTableKeys as less I/O is involved both server-side and between the server and client.- Returns:
- An
AsyncIteratorthat can be used to iterate over Keys in thisKeyValueTable. The returnedAsyncIteratorguarantees the serialization of invocations toAsyncIterator.getNext(). SeeAsyncIterator.asSequential(java.util.concurrent.Executor).
-
entries
io.pravega.common.util.AsyncIterator<IteratorItem<TableEntry>> entries()
Creates a new Iterator overTableEntryinstances in the associatedKeyValueTable. This should be used if both the Keys and their associated Values are needed and is preferred to usingkeys()to get the Keys and then issuingKeyValueTable.get(io.pravega.client.tables.TableKey)/KeyValueTable.getAll(java.lang.Iterable<io.pravega.client.tables.TableKey>)to retrieve the Values.- Returns:
- An
AsyncIteratorthat can be used to iterate over Entries in thisKeyValueTable. The returnedAsyncIteratorguarantees the serialization of invocations toAsyncIterator.getNext(). SeeAsyncIterator.asSequential(java.util.concurrent.Executor).
-
-