Package io.pravega.client.tables
Interface KeyValueTableIterator.Builder
-
- Enclosing interface:
- KeyValueTableIterator
public static interface KeyValueTableIterator.BuilderDefines a Builder for aKeyValueTableIterator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KeyValueTableIteratorall()Creates a newKeyValueTableIteratorthat returns all theTableKey/TableEntryinstances in the associatedKeyValueTable.KeyValueTableIteratorforPrefix(java.nio.ByteBuffer primaryKeyPrefix)Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with Primary Keys (seeTableKey.getPrimaryKey()that begin with the given prefix.KeyValueTableIteratorforPrimaryKey(@NonNull java.nio.ByteBuffer primaryKey)Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with the same Primary Key (seeTableKey.getPrimaryKey().KeyValueTableIteratorforPrimaryKey(@NonNull java.nio.ByteBuffer primaryKey, java.nio.ByteBuffer secondaryKeyPrefix)Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with the same Primary Key (seeTableKey.getPrimaryKey()and all Secondary keys (seeTableKey.getSecondaryKey()) that begin with the given prefix.KeyValueTableIteratorforPrimaryKey(@NonNull java.nio.ByteBuffer primaryKey, java.nio.ByteBuffer fromSecondaryKey, java.nio.ByteBuffer toSecondaryKey)Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with the same Primary Key (seeTableKey.getPrimaryKey().KeyValueTableIteratorforRange(java.nio.ByteBuffer fromPrimaryKey, java.nio.ByteBuffer toPrimaryKey)Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with Primary Keys (seeTableKey.getPrimaryKey()between the two values.KeyValueTableIterator.BuildermaxIterationSize(int maxIterationSize)Sets the maximum number of items to return with each call toAsyncIterator.getNext().
-
-
-
Method Detail
-
maxIterationSize
KeyValueTableIterator.Builder maxIterationSize(int maxIterationSize)
Sets the maximum number of items to return with each call toAsyncIterator.getNext().- Parameters:
maxIterationSize- The maximum number of items to return with each call toAsyncIterator.getNext().- Returns:
- This instance.
-
forPrimaryKey
KeyValueTableIterator forPrimaryKey(@NonNull @NonNull java.nio.ByteBuffer primaryKey)
Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with the same Primary Key (seeTableKey.getPrimaryKey(). This will iterate through allTableKey/TableEntryinstances matching the given Primary Key.- Parameters:
primaryKey- AByteBufferrepresenting the full Primary Key to search.- Returns:
- A new
KeyValueTableIteratorthat can be used for the iteration.
-
forPrimaryKey
KeyValueTableIterator forPrimaryKey(@NonNull @NonNull java.nio.ByteBuffer primaryKey, @Nullable java.nio.ByteBuffer fromSecondaryKey, @Nullable java.nio.ByteBuffer toSecondaryKey)
Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with the same Primary Key (seeTableKey.getPrimaryKey(). Depending on the arguments provided, this may iterate through allTableKey/TableEntryinstances matching the given Primary Key or a sub-range.- Parameters:
primaryKey- AByteBufferrepresenting the full Primary Key to search.fromSecondaryKey- AByteBufferthat indicates the Secondary Key (seeTableKey.getSecondaryKey()) to begin the iteration at. If not provided (null), the iterator will begin with the firstTableKey/TableEntrythat has the given Primary Key. This argument is inclusive.toSecondaryKey- AByteBufferthat indicates the Secondary Key (seeTableKey.getSecondaryKey()) to end the iteration at. If not provided (null), the iterator will end with the lastTableKey/TableEntrythat has the given Primary Key. This argument is inclusive.- Returns:
- A new
KeyValueTableIteratorthat can be used for the iteration.
-
forPrimaryKey
KeyValueTableIterator forPrimaryKey(@NonNull @NonNull java.nio.ByteBuffer primaryKey, @Nullable java.nio.ByteBuffer secondaryKeyPrefix)
Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with the same Primary Key (seeTableKey.getPrimaryKey()and all Secondary keys (seeTableKey.getSecondaryKey()) that begin with the given prefix. Depending on the arguments provided, this may iterate through allTableKey/TableEntryinstances matching the given Primary Key or a sub-range.- Parameters:
primaryKey- AByteBufferrepresenting the full Primary Key to search.secondaryKeyPrefix- AByteBufferthat indicates the Secondary Key prefix for allTableKey/TableEntryinstances to return. If not provided (null), the iterator will list allTableKey/TableEntryinstances that match the given Primary Key.- Returns:
- A new
KeyValueTableIteratorthat can be used for the iteration.
-
forRange
KeyValueTableIterator forRange(@Nullable java.nio.ByteBuffer fromPrimaryKey, @Nullable java.nio.ByteBuffer toPrimaryKey)
Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with Primary Keys (seeTableKey.getPrimaryKey()between the two values. Depending on the arguments provided, this may iterate through allTableKey/TableEntryinstances within theKeyValueTableor a sub-range.- Parameters:
fromPrimaryKey- AByteBufferthat indicates the Primary Key (seeTableKey.getPrimaryKey()) to begin the iteration at. If not provided (null), the iterator will begin with the firstTableKey/TableEntryin theKeyValueTable. This argument is inclusive.toPrimaryKey- AByteBufferthat indicates the Primary Key (seeTableKey.getPrimaryKey()) to end the iteration at. If not provided (null), the iterator will end with the lastTableKey/TableEntryin theKeyValueTable. This argument is inclusive.- Returns:
- A new
KeyValueTableIteratorthat can be used for the iteration.
-
forPrefix
KeyValueTableIterator forPrefix(@Nullable java.nio.ByteBuffer primaryKeyPrefix)
Creates a newKeyValueTableIteratorthat returnsTableKey/TableEntryinstances with Primary Keys (seeTableKey.getPrimaryKey()that begin with the given prefix. Depending on the arguments provided, this may iterate through allTableKey/TableEntryinstances within theKeyValueTableor a sub-range.- Parameters:
primaryKeyPrefix- AByteBufferthat indicates the Primary Key prefix for allTableKey/TableEntryinstances to return. If not provided (null), the iterator will list allTableKey/TableEntryinstances in theKeyValueTable.- Returns:
- A new
KeyValueTableIteratorthat can be used for the iteration.
-
all
KeyValueTableIterator all()
Creates a newKeyValueTableIteratorthat returns all theTableKey/TableEntryinstances in the associatedKeyValueTable.- Returns:
- A new
KeyValueTableIteratorthat can be used for the iteration.
-
-