Package org.projectnessie.versioned
Class Put
java.lang.Object
org.projectnessie.versioned.Put
- All Implemented Interfaces:
Operation
Setting a new value. Can optionally declare whether the prior hash must match.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.projectnessie.versioned.Operation
Operation.OperationType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetType()org.projectnessie.model.ContentgetValue()The value to store for this operation.protected abstract Supplier<org.projectnessie.model.Content> inthashCode()static Putof(org.projectnessie.model.ContentKey key, org.projectnessie.model.Content value) Creates an (eagerly-evaluated) put-operation for the given key and value.static PutofLazy(org.projectnessie.model.ContentKey key, int payload, org.projectnessie.nessie.relocated.protobuf.ByteString value) Creates a lazily-evaluated put-operation for the given key, payload and ByteString value.static PutofLazy(org.projectnessie.model.ContentKey key, int payload, org.projectnessie.nessie.relocated.protobuf.ByteString value, Supplier<org.projectnessie.nessie.relocated.protobuf.ByteString> globalStateSupplier) Creates a lazily-evaluated put-operation for the given key, payload, ByteString value and global state supplier.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.projectnessie.versioned.Operation
getKey, shouldMatchHash
-
Constructor Details
-
Put
public Put()
-
-
Method Details
-
getValue
@Lazy public org.projectnessie.model.Content getValue()The value to store for this operation.- Returns:
- the value
-
getType
-
getValueSupplier
-
of
@Nonnull public static Put of(@Nonnull org.projectnessie.model.ContentKey key, @Nonnull org.projectnessie.model.Content value) Creates an (eagerly-evaluated) put-operation for the given key and value.valuewith anullcontent ID is required when creating/adding new content.valuewith a non-nullcontent ID is required when updating existing content.A content object is considered to be the same using the
content-keyand thecontent-id.- Parameters:
key- the key impacted by the operationvalue- the new value associated with the key- Returns:
- a put operation for the key and value
-
ofLazy
@Nonnull public static Put ofLazy(org.projectnessie.model.ContentKey key, int payload, org.projectnessie.nessie.relocated.protobuf.ByteString value) Creates a lazily-evaluated put-operation for the given key, payload and ByteString value. -
ofLazy
@Nonnull public static Put ofLazy(org.projectnessie.model.ContentKey key, int payload, org.projectnessie.nessie.relocated.protobuf.ByteString value, Supplier<org.projectnessie.nessie.relocated.protobuf.ByteString> globalStateSupplier) Creates a lazily-evaluated put-operation for the given key, payload, ByteString value and global state supplier. -
equals
-
hashCode
public int hashCode() -
toString
-