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.
    • Method Detail

      • 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
        @Nonnull
        static Unchanged of​(@Nonnull @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