Interface PutOption

All Known Subinterfaces:
OptionVersionId
All Known Implementing Classes:
OptionEphemeral, OptionPartitionKey, OptionSecondaryIndex, OptionSequenceKeysDeltas, OptionVersionId.OptionRecordDoesNotExist, OptionVersionId.OptionVersionIdEqual

  • Field Details

    • IfRecordDoesNotExist

      static final PutOption IfRecordDoesNotExist
    • AsEphemeralRecord

      static final PutOption AsEphemeralRecord
  • Method Details

    • IfVersionIdEquals

      static OptionVersionId.OptionVersionIdEqual IfVersionIdEquals(long versionId)
    • PartitionKey

      static PutOption 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
    • SequenceKeysDeltas

      static PutOption SequenceKeysDeltas(@NonNull @NonNull List<Long> sequenceKeysDeltas)
      SequenceKeysDeltas will request that the final record key to be assigned by the server, based on the prefix record key and appending one or more sequences.

      The sequence numbers will be atomically added based on the deltas. Deltas must be >= 0 and the first one strictly > 0. SequenceKeysDeltas also requires that a [PartitionKey] option is provided.

      Parameters:
      sequenceKeysDeltas -
      Returns:
    • SecondaryIndex

      static PutOption SecondaryIndex(@NonNull @NonNull String indexName, String secondaryKey)
      SecondaryIndex let the users specify additional keys to index the record Index names are arbitrary strings and can be used in SyncOxiaClient.list(String, String, Set) and SyncOxiaClient.rangeScan(String, String, Set) requests.

      Secondary keys are not required to be unique.

      Multiple secondary indexes can be passed on the same record, even reusing multiple times the same indexName.

      Parameters:
      indexName - the name of the secondary index
      secondaryKey - the secondary key for this record
      Returns: