Package io.pravega.client.tables
Class TableEntry<KeyT,ValueT>
- java.lang.Object
-
- io.pravega.client.tables.TableEntry<KeyT,ValueT>
-
- Type Parameters:
KeyT- Key Type.ValueT- Value Type
public class TableEntry<KeyT,ValueT> extends java.lang.ObjectAKeyValueTableEntry.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull TableKey<KeyT>getKey()TheTableKey.ValueTgetValue()The Value.static <KeyT,ValueT>
TableEntry<KeyT,ValueT>notExists(KeyT key, ValueT value)Creates a newTableEntrywith a version that indicates the key must not exist.java.lang.StringtoString()static <KeyT,ValueT>
TableEntry<KeyT,ValueT>unversioned(KeyT key, ValueT value)Creates a newTableEntrywith no specific version.static <KeyT,ValueT>
TableEntry<KeyT,ValueT>versioned(KeyT key, Version version, ValueT value)Creates a newTableEntrywith a specific key version..
-
-
-
Method Detail
-
unversioned
public static <KeyT,ValueT> TableEntry<KeyT,ValueT> unversioned(KeyT key, ValueT value)
Creates a newTableEntrywith no specific version. When used withKeyValueTable.replaceAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableEntry<KeyT, ValueT>>), thisTableEntrywill be treated as an unconditional update.- Type Parameters:
KeyT- Key Type.ValueT- Value Type.- Parameters:
key- The Entry Key.value- The Entry Value.- Returns:
- An unversioned
TableEntry(version set toVersion.NO_VERSION).
-
notExists
public static <KeyT,ValueT> TableEntry<KeyT,ValueT> notExists(KeyT key, ValueT value)
Creates a newTableEntrywith a version that indicates the key must not exist. When used withKeyValueTable.replaceAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableEntry<KeyT, ValueT>>), thisTableEntrywill be treated as a conditional update, conditioned on the Key not existing.- Type Parameters:
KeyT- Key Type.ValueT- Value Type.- Parameters:
key- The Entry Key.value- The Entry Value.- Returns:
- A
TableEntrywith a version set toVersion.NOT_EXISTS.
-
versioned
public static <KeyT,ValueT> TableEntry<KeyT,ValueT> versioned(KeyT key, Version version, ValueT value)
Creates a newTableEntrywith a specific key version.. When used withKeyValueTable.replaceAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableEntry<KeyT, ValueT>>), thisTableEntrywill be treated as a conditional update, conditioned on the Key existing and having the specified version.- Type Parameters:
KeyT- Key Type.ValueT- Value Type.- Parameters:
key- The Entry Key.value- The Entry Value.version- The Version to use.- Returns:
- A
TableEntry.
-
getKey
@NonNull public @NonNull TableKey<KeyT> getKey()
TheTableKey.- Returns:
- The content of
TableKey.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-