Package org.infinispan.functional.impl
Class EntryViews
java.lang.Object
org.infinispan.functional.impl.EntryViews
Entry views implementation class holder.
- Since:
- 8.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static final class
static final class
static final class
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> EntryView.ReadEntryView<K, V> static <K,
V> EntryView.ReadEntryView<K, V> noValue
(Object key, DataConversion keyDataConversion) static <K,
V> EntryView.ReadEntryView<K, V> static <K,
V> EntryView.ReadEntryView<K, V> readOnly
(CacheEntry entry) static <K,
V> EntryView.ReadEntryView<K, V> readOnly
(CacheEntry<K, V> entry, DataConversion keyDataConversion, DataConversion valueDataConversion) static <K,
V> EntryViews.AccessLoggingReadWriteView<K, V> readWrite
(MVCCEntry entry, Object prevValue, Metadata prevMetadata, DataConversion keyDataConversion, DataConversion valueDataConversion) static <K,
V> EntryViews.AccessLoggingReadWriteView<K, V> readWrite
(MVCCEntry entry, DataConversion keyDataConversion, DataConversion valueDataConversion) static <R> R
snapshot
(R ret) For convenience, a lambda might decide to return the entry view it received as parameter, because that makes easy to return both value and meta parameters back to the client.static <K,
V> EntryView.WriteEntryView<K, V> writeOnly
(CacheEntry entry, DataConversion valueDataConversion)
-
Method Details
-
readOnly
public static <K,V> EntryView.ReadEntryView<K,V> readOnly(CacheEntry<K, V> entry, DataConversion keyDataConversion, DataConversion valueDataConversion) -
readOnly
-
readOnly
-
writeOnly
public static <K,V> EntryView.WriteEntryView<K,V> writeOnly(CacheEntry entry, DataConversion valueDataConversion) -
readWrite
public static <K,V> EntryViews.AccessLoggingReadWriteView<K,V> readWrite(MVCCEntry entry, DataConversion keyDataConversion, DataConversion valueDataConversion) -
readWrite
public static <K,V> EntryViews.AccessLoggingReadWriteView<K,V> readWrite(MVCCEntry entry, Object prevValue, Metadata prevMetadata, DataConversion keyDataConversion, DataConversion valueDataConversion) -
noValue
-
noValue
public static <K,V> EntryView.ReadEntryView<K,V> noValue(Object key, DataConversion keyDataConversion) -
snapshot
public static <R> R snapshot(R ret) For convenience, a lambda might decide to return the entry view it received as parameter, because that makes easy to return both value and meta parameters back to the client.If the lambda function decides to return an view, launder it into an immutable view to avoid the user trying apply any modifications to the entry view from outside the lambda function.
If the view is read-only, capture its data into a snapshot from the cached entry and avoid changing underneath.
-