Package io.pravega.client.tables
Class Put
- java.lang.Object
-
- io.pravega.client.tables.TableModification
-
- io.pravega.client.tables.TableEntryUpdate
-
- io.pravega.client.tables.Put
-
public final class Put extends TableEntryUpdate
Updates the Value associated with aTableKeyin aKeyValueTable.
-
-
Constructor Summary
Constructors Constructor Description Put(TableKey key, java.nio.ByteBuffer value)Creates a new instance of thePutclass for an unconditional update.Put(TableKey key, java.nio.ByteBuffer value, Version version)Creates a new instance of thePutclass for a conditional update.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VersiongetVersion()Gets aVersionthat may condition the modification.java.lang.StringtoString()-
Methods inherited from class io.pravega.client.tables.TableEntryUpdate
getValue, isRemoval
-
Methods inherited from class io.pravega.client.tables.TableModification
getKey
-
-
-
-
Constructor Detail
-
Put
public Put(TableKey key, java.nio.ByteBuffer value)
Creates a new instance of thePutclass for an unconditional update.
-
Put
public Put(TableKey key, java.nio.ByteBuffer value, @Nullable Version version)
Creates a new instance of thePutclass for a conditional update.- Parameters:
key- TheTableKeyto update.value- The Value to associate withTableKey.version- (Optional) TheVersionto condition the update on. This can be retrieved fromTableEntry.getVersion()or it may beVersion.NOT_EXISTSorVersion.NO_VERSION. Ifnull, this will be substituted withVersion.NO_VERSION, which makes this operation an Unconditional Update.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getVersion
public Version getVersion()
Description copied from class:TableModificationGets aVersionthat may condition the modification. SeeKeyValueTablefor details on conditional updates.- Specified by:
getVersionin classTableModification- Returns:
- The
Version.
-
-