Package io.pravega.client.tables
Class Remove
- java.lang.Object
-
- io.pravega.client.tables.TableModification
-
- io.pravega.client.tables.Remove
-
public final class Remove extends TableModification
Removes aTableKey
from aKeyValueTable
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Version
getVersion()
Gets aVersion
that may condition the modification.boolean
isRemoval()
Gets a value indicating whether this modification attempts to remove theTableKey
or not.java.lang.String
toString()
-
Methods inherited from class io.pravega.client.tables.TableModification
getKey
-
-
-
-
Constructor Detail
-
Remove
public Remove(TableKey key)
Creates a new instance of theRemove
class for an unconditional removal.- Parameters:
key
- TheTableKey
to remove.
-
Remove
public Remove(TableKey key, @Nullable Version version)
Creates a new instance of theRemove
class for a conditional removal.- Parameters:
key
- TheTableKey
to remove.version
- Optional) TheVersion
to condition the removal 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
-
isRemoval
public boolean isRemoval()
Description copied from class:TableModification
Gets a value indicating whether this modification attempts to remove theTableKey
or not.- Specified by:
isRemoval
in classTableModification
- Returns:
- True if removal, false otherwise.
-
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
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-