Class TransactionEntry<K,V>
- java.lang.Object
-
- org.infinispan.client.hotrod.impl.transaction.entry.TransactionEntry<K,V>
-
public class TransactionEntry<K,V> extends Object
An entry in theTransactionContext
.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).
- Since:
- 9.3
- Author:
- Pedro Ruivo
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Method Detail
-
nonExistingEntry
public static <K,V> TransactionEntry<K,V> nonExistingEntry(K key)
-
notReadEntry
public static <K,V> TransactionEntry<K,V> notReadEntry(K key)
-
read
public static <K,V> TransactionEntry<K,V> read(K key, MetadataValue<V> value)
-
getVersion
public long getVersion()
-
getValue
public V getValue()
-
toVersionValue
public VersionedValue<V> toVersionValue()
-
toMetadataValue
public MetadataValue<V> toMetadataValue()
-
isModified
public boolean isModified()
-
isNonExists
public boolean isNonExists()
-
exists
public boolean exists()
-
set
public void set(V value, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)
-
remove
public void remove()
-
toModification
public Modification toModification(Function<K,byte[]> keyMarshaller, Function<V,byte[]> valueMarshaller)
-
-