Interface ListOption

All Known Implementing Classes:
OptionPartitionKey, OptionSecondaryIndexName

public sealed interface ListOption permits OptionPartitionKey, OptionSecondaryIndexName
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static ListOption
    PartitionKey(@NonNull String partitionKey)
    PartitionKey overrides the partition routing with the specified `partitionKey` instead of the regular record key.
    static ListOption
    UseIndex(@NonNull String secondaryIndexName)
    UseIndex let the users specify a different index to follow for the list operation
  • Method Details

    • PartitionKey

      static ListOption PartitionKey(@NonNull @NonNull String partitionKey)
      PartitionKey overrides the partition routing with the specified `partitionKey` instead of the regular record key.

      Records with the same partitionKey will always be guaranteed to be co-located in the same Oxia shard.

      Parameters:
      partitionKey - the partition key to use
    • UseIndex

      static ListOption UseIndex(@NonNull @NonNull String secondaryIndexName)
      UseIndex let the users specify a different index to follow for the list operation

      Note: The returned list will contain they primary keys of the records

      Parameters:
      secondaryIndexName - the name of the secondary index to use for the list operation