Interface Unchanged

All Superinterfaces:
Operation

@Immutable public interface Unchanged extends Operation
An operation when ensures that a value has been unchanged since the expected hash for a commit. Always expects to match hash since this is otherwise a no-op. Can be used to enforce serialized transaction isolation confirming that no operations have occurred to the provided key since the operation stated.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.projectnessie.versioned.Operation

    Operation.OperationType
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static Unchanged
    of(org.projectnessie.model.ContentKey key)
    Creates a unchanged operation for the given key.
    default boolean
    Whether the commit expected hash should be reviewed to confirm the key for this operation hasn't changed since the expected hash.

    Methods inherited from interface org.projectnessie.versioned.Operation

    getKey
  • Method Details

    • getType

      default Operation.OperationType getType()
      Specified by:
      getType in interface Operation
    • shouldMatchHash

      default boolean shouldMatchHash()
      Description copied from interface: Operation
      Whether the commit expected hash should be reviewed to confirm the key for this operation hasn't changed since the expected hash.
      Specified by:
      shouldMatchHash in interface Operation
      Returns:
      True if this operation should match the hash.
    • of

      @Nonnull static Unchanged of(@Nonnull org.projectnessie.model.ContentKey key)
      Creates a unchanged operation for the given key.
      Parameters:
      key - the key impacted by the operation
      Returns:
      a unchanged operation for the key