Record Class Operation.WriteOperation.PutOperation

java.lang.Object
java.lang.Record
io.streamnative.oxia.client.batch.Operation.WriteOperation.PutOperation
All Implemented Interfaces:
Operation<PutResult>, Operation.WriteOperation<PutResult>
Enclosing interface:
Operation.WriteOperation<R>

public static record Operation.WriteOperation.PutOperation(@NonNull CompletableFuture<PutResult> callback, @NonNull String key, @NonNull Optional<String> partitionKey, @NonNull Optional<List<Long>> sequenceKeysDeltas, byte @NonNull [] value, @NonNull OptionalLong expectedVersionId, OptionalLong sessionId, Optional<String> clientIdentifier, List<OptionSecondaryIndex> secondaryIndexes) extends Record implements Operation.WriteOperation<PutResult>
  • Constructor Details

    • PutOperation

      public PutOperation(@NonNull @NonNull CompletableFuture<PutResult> callback, @NonNull @NonNull String key, @NonNull @NonNull Optional<String> partitionKey, @NonNull @NonNull Optional<List<Long>> sequenceKeysDeltas, byte @NonNull [] value, @NonNull @NonNull OptionalLong expectedVersionId, OptionalLong sessionId, Optional<String> clientIdentifier, List<OptionSecondaryIndex> secondaryIndexes)
      Creates an instance of a PutOperation record class.
      Parameters:
      callback - the value for the callback record component
      key - the value for the key record component
      partitionKey - the value for the partitionKey record component
      sequenceKeysDeltas - the value for the sequenceKeysDeltas record component
      value - the value for the value record component
      expectedVersionId - the value for the expectedVersionId record component
      sessionId - the value for the sessionId record component
      clientIdentifier - the value for the clientIdentifier record component
      secondaryIndexes - the value for the secondaryIndexes record component
  • Method Details

    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • callback

      @NonNull public @NonNull CompletableFuture<PutResult> callback()
      Returns the value of the callback record component.
      Specified by:
      callback in interface Operation<PutResult>
      Returns:
      the value of the callback record component
    • key

      @NonNull public @NonNull String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • partitionKey

      @NonNull public @NonNull Optional<String> partitionKey()
      Returns the value of the partitionKey record component.
      Returns:
      the value of the partitionKey record component
    • sequenceKeysDeltas

      @NonNull public @NonNull Optional<List<Long>> sequenceKeysDeltas()
      Returns the value of the sequenceKeysDeltas record component.
      Returns:
      the value of the sequenceKeysDeltas record component
    • value

      public byte @NonNull [] value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • expectedVersionId

      @NonNull public @NonNull OptionalLong expectedVersionId()
      Returns the value of the expectedVersionId record component.
      Returns:
      the value of the expectedVersionId record component
    • sessionId

      public OptionalLong sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component
    • clientIdentifier

      public Optional<String> clientIdentifier()
      Returns the value of the clientIdentifier record component.
      Returns:
      the value of the clientIdentifier record component
    • secondaryIndexes

      public List<OptionSecondaryIndex> secondaryIndexes()
      Returns the value of the secondaryIndexes record component.
      Returns:
      the value of the secondaryIndexes record component