Interface DeleteOption


public interface DeleteOption
Options for deleting a record.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    IfVersionIdEquals(long versionId)
    Conditional delete will only succeed if the record's version matches the supplied versionId.
    PartitionKey(String partitionKey)
    PartitionKey overrides the partition routing with the specified `partitionKey` instead of the regular record key.
  • Method Details

    • IfVersionIdEquals

      static DeleteOption IfVersionIdEquals(long versionId)
      Conditional delete will only succeed if the record's version matches the supplied versionId.
      Parameters:
      versionId - the versionId to compare with the record's version.
      Returns:
      the delete option.
    • PartitionKey

      static DeleteOption PartitionKey(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
      Returns:
      the delete option.