Package io.pravega.client.tables
Class TableKey<KeyT>
- java.lang.Object
- 
- io.pravega.client.tables.TableKey<KeyT>
 
- 
- Type Parameters:
- KeyT- Type of the Key.
 
 public class TableKey<KeyT> extends java.lang.ObjectAKeyValueTableKey with aVersion.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyTgetKey()The Key.VersiongetVersion()The Version.static <KeyT> TableKey<KeyT>notExists(KeyT key)Creates a newTableKeywith a version that indicates the key must not exist.java.lang.StringtoString()static <KeyT> TableKey<KeyT>unversioned(KeyT key)Creates a newTableKeywith no specific version.static <KeyT> TableKey<KeyT>versioned(KeyT key, Version version)Creates a newTableKeywith a specific version.
 
- 
- 
- 
Method Detail- 
unversionedpublic static <KeyT> TableKey<KeyT> unversioned(KeyT key) Creates a newTableKeywith no specific version. When used withKeyValueTable.removeAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableKey<KeyT>>), thisTableKeywill be treated as an unconditional removal.- Type Parameters:
- KeyT- Key Type.
- Parameters:
- key- The Key.
- Returns:
- An unversioned TableKey(version set toVersion.NO_VERSION).
 
 - 
notExistspublic static <KeyT> TableKey<KeyT> notExists(KeyT key) Creates a newTableKeywith a version that indicates the key must not exist. When used withKeyValueTable.removeAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableKey<KeyT>>), thisTableKeywill be treated conditional removal.By itself, this is not a useful scenario (removing a key conditioned on it not existing in the first place doesn't make much sense). However, when used in combination with other removals ( KeyValueTable.removeAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableKey<KeyT>>)accepts multipleTableKeys), this can be used to condition the entire batch on a particularTableKey's inexistence (i.e., only perform these removals iff a certainTableKeyis not present).- Type Parameters:
- KeyT- Key Type
- Parameters:
- key- The Key.
- Returns:
- A TableKeywith a version set toVersion.NOT_EXISTS.
 
 - 
versionedpublic static <KeyT> TableKey<KeyT> versioned(KeyT key, Version version) Creates a newTableKeywith a specific version. When used withKeyValueTable.removeAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableKey<KeyT>>), thisTableKeywill be treated as a conditional removal, conditioned on the Key existing and having the specified version.- Type Parameters:
- KeyT- Key Type.
- Parameters:
- key- The Key.
- version- The Version.
- Returns:
- A TableKey.
 
 - 
getKey@NonNull public KeyT getKey() The Key.- Returns:
- The Key.
 
 - 
getVersionpublic Version getVersion() The Version. If null, any updates for this Key will be unconditional. SeeKeyValueTablefor details on conditional updates.- Returns:
- Version associated with the key.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-