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 aTableKey
in aKeyValueTable
.
-
-
Constructor Summary
Constructors Constructor Description Put(TableKey key, java.nio.ByteBuffer value)
Creates a new instance of thePut
class for an unconditional update.Put(TableKey key, java.nio.ByteBuffer value, Version version)
Creates a new instance of thePut
class for a conditional update.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Version
getVersion()
Gets aVersion
that may condition the modification.java.lang.String
toString()
-
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 thePut
class for an unconditional update.
-
Put
public Put(TableKey key, java.nio.ByteBuffer value, @Nullable Version version)
Creates a new instance of thePut
class for a conditional update.- Parameters:
key
- TheTableKey
to update.value
- The Value to associate withTableKey
.version
- (Optional) TheVersion
to condition the update on. This can be retrieved fromTableEntry.getVersion()
or it may beVersion.NOT_EXISTS
orVersion.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:
toString
in classjava.lang.Object
-
getVersion
public Version getVersion()
Description copied from class:TableModification
Gets aVersion
that may condition the modification. SeeKeyValueTable
for details on conditional updates.- Specified by:
getVersion
in classTableModification
- Returns:
- The
Version
.
-
-