public class TransactionEntry<K,V> extends Object
TransactionContext
.
It represents a single key and contains its initial version (if it was read) and the most up-to-date value (can be null if the key was removed).
Modifier and Type | Method and Description |
---|---|
boolean |
exists() |
V |
getValue() |
long |
getVersion() |
boolean |
isModified() |
boolean |
isNonExists() |
static <K,V> TransactionEntry<K,V> |
nonExistingEntry(K key) |
static <K,V> TransactionEntry<K,V> |
notReadEntry(K key) |
static <K,V> TransactionEntry<K,V> |
read(K key,
MetadataValue<V> value) |
void |
remove() |
void |
set(V value,
long lifespan,
TimeUnit lifespanTimeUnit,
long maxIdle,
TimeUnit maxIdleTimeUnit) |
MetadataValue<V> |
toMetadataValue() |
Modification |
toModification(Function<K,byte[]> keyMarshaller,
Function<V,byte[]> valueMarshaller) |
String |
toString() |
VersionedValue<V> |
toVersionValue() |
public static <K,V> TransactionEntry<K,V> nonExistingEntry(K key)
public static <K,V> TransactionEntry<K,V> notReadEntry(K key)
public static <K,V> TransactionEntry<K,V> read(K key, MetadataValue<V> value)
public long getVersion()
public V getValue()
public VersionedValue<V> toVersionValue()
public MetadataValue<V> toMetadataValue()
public boolean isModified()
public boolean isNonExists()
public boolean exists()
public void set(V value, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)
public void remove()
public Modification toModification(Function<K,byte[]> keyMarshaller, Function<V,byte[]> valueMarshaller)
Copyright © 2021 JBoss by Red Hat. All rights reserved.