Package org.projectnessie.versioned
Class Put
- java.lang.Object
-
- org.projectnessie.versioned.Put
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.projectnessie.versioned.Operation
Operation.OperationType
-
-
Constructor Summary
Constructors Constructor Description Put()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Operation.OperationTypegetType()org.projectnessie.model.ContentgetValue()The value to store for this operation.protected abstract java.util.function.Supplier<org.projectnessie.model.Content>getValueSupplier()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, java.util.function.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.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.projectnessie.versioned.Operation
getKey, shouldMatchHash
-
-
-
-
Method Detail
-
getValue
@Lazy public org.projectnessie.model.Content getValue()
The value to store for this operation.- Returns:
- the value
-
getType
public Operation.OperationType getType()
-
getValueSupplier
protected abstract java.util.function.Supplier<org.projectnessie.model.Content> getValueSupplier()
-
of
@Nonnull @Nonnull public static Put of(@Nonnull @Nonnull org.projectnessie.model.ContentKey key, @Nonnull @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 @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 @Nonnull public static Put ofLazy(org.projectnessie.model.ContentKey key, int payload, org.projectnessie.nessie.relocated.protobuf.ByteString value, java.util.function.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
public boolean equals(@Nullable java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-