KeyT
- Key Type.ValueT
- Value Typepublic class TableEntry<KeyT,ValueT>
extends java.lang.Object
KeyValueTable
Entry.Modifier and Type | Method and Description |
---|---|
@NonNull TableKey<KeyT> |
getKey()
The
TableKey . |
ValueT |
getValue()
The Value.
|
static <KeyT,ValueT> |
notExists(KeyT key,
ValueT value)
Creates a new
TableEntry with a version that indicates the key must not exist. |
java.lang.String |
toString() |
static <KeyT,ValueT> |
unversioned(KeyT key,
ValueT value)
Creates a new
TableEntry with no specific version. |
static <KeyT,ValueT> |
versioned(KeyT key,
Version version,
ValueT value)
Creates a new
TableEntry with a specific key version.. |
public static <KeyT,ValueT> TableEntry<KeyT,ValueT> unversioned(KeyT key, ValueT value)
TableEntry
with no specific version. When used with KeyValueTable.replaceAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableEntry<KeyT, ValueT>>)
, this
TableEntry
will be treated as an unconditional update.KeyT
- Key Type.ValueT
- Value Type.key
- The Entry Key.value
- The Entry Value.TableEntry
(version set to Version.NO_VERSION
).public static <KeyT,ValueT> TableEntry<KeyT,ValueT> notExists(KeyT key, ValueT value)
TableEntry
with a version that indicates the key must not exist. When used with
KeyValueTable.replaceAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableEntry<KeyT, ValueT>>)
, this TableEntry
will be treated as a conditional update, conditioned
on the Key not existing.KeyT
- Key Type.ValueT
- Value Type.key
- The Entry Key.value
- The Entry Value.TableEntry
with a version set to Version.NOT_EXISTS
.public static <KeyT,ValueT> TableEntry<KeyT,ValueT> versioned(KeyT key, Version version, ValueT value)
TableEntry
with a specific key version.. When used with KeyValueTable.replaceAll(java.lang.String, java.lang.Iterable<io.pravega.client.tables.TableEntry<KeyT, ValueT>>)
,
this TableEntry
will be treated as a conditional update, conditioned on the Key existing and having the
specified version.KeyT
- Key Type.ValueT
- Value Type.key
- The Entry Key.value
- The Entry Value.version
- The Version to use.TableEntry
.@NonNull public @NonNull TableKey<KeyT> getKey()
TableKey
.TableKey
.public java.lang.String toString()
toString
in class java.lang.Object