Class EntryViews.ReadWriteSnapshotView<K,V>
- All Implemented Interfaces:
EntryView.ReadEntryView<K,
,V> EntryView.ReadWriteEntryView<K,
,V> EntryView.WriteEntryView<K,
,V> MetaParam.Lookup
- Enclosing class:
EntryViews
- Since:
- 8.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfind()
Optional value.findMetaParam
(Class<T> type) get()
Returns a non-null value if the key has a value associated with it or throwsNoSuchElementException
if no value is associated with the entry.key()
Key of the read-only entry view.remove()
Removes the value and any metadata parameters associated with it.set
(V value, MetaParam.Writable... metas) Set this value along with optional metadata parameters.Set this value along with metadata object.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.infinispan.functional.EntryView.ReadEntryView
find, get, key, peek
Methods inherited from interface org.infinispan.functional.EntryView.WriteEntryView
key
Methods inherited from interface org.infinispan.functional.MetaParam.Lookup
findMetaParam
-
Constructor Details
-
ReadWriteSnapshotView
-
-
Method Details
-
set
Description copied from interface:EntryView.WriteEntryView
Set this value along with optional metadata parameters.This method returns
Void
instead of 'void' to avoid having to add overloaded methods in functional map that takeConsumer
instead ofFunction
. This is an unfortunate side effect of the Java language itself which does not consider 'void' to be anObject
.- Specified by:
set
in interfaceEntryView.WriteEntryView<K,
V>
-
set
Description copied from interface:EntryView.WriteEntryView
Set this value along with metadata object.This method returns
Void
instead of 'void' to avoid having to add overloaded methods in functional map that takeConsumer
instead ofFunction
. This is an unfortunate side effect of the Java language itself which does not consider 'void' to be anObject
.- Specified by:
set
in interfaceEntryView.WriteEntryView<K,
V>
-
remove
Description copied from interface:EntryView.WriteEntryView
Removes the value and any metadata parameters associated with it.This method returns
Void
instead of 'void' to avoid having to add overloaded methods in functional map that takeConsumer
instead ofFunction
. This is an unfortunate side effect of the Java language itself which does not consider 'void' to be anObject
.- Specified by:
remove
in interfaceEntryView.WriteEntryView<K,
V>
-
toString
-
key
Description copied from interface:EntryView.ReadEntryView
Key of the read-only entry view. Guaranteed to return a non-null value. The instance of the key must not be mutated.- Specified by:
key
in interfaceEntryView.ReadEntryView<K,
V>
-
get
Description copied from interface:EntryView.ReadEntryView
Returns a non-null value if the key has a value associated with it or throwsNoSuchElementException
if no value is associated with the entry.The value instance is read-only and must not be mutated. If the function accessing this value is about to update the entry, it has to create a defensive copy (or completely new instance) and store it using
EntryView.WriteEntryView.set(Object, MetaParam.Writable[])
.- Specified by:
get
in interfaceEntryView.ReadEntryView<K,
V> - Throws:
NoSuchElementException
- if no value is associated with the key.
-
find
Description copied from interface:EntryView.ReadEntryView
Optional value. It'll return a non-empty value when the value is present, and empty when the value is not present.The value instance is read-only and must not be mutated. If the function accessing this value is about to update the entry, it has to create a defensive copy (or completely new instance) and store it using
EntryView.WriteEntryView.set(Object, MetaParam.Writable[])
.- Specified by:
find
in interfaceEntryView.ReadEntryView<K,
V>
-
findMetaParam
Description copied from interface:MetaParam.Lookup
Returns a non-emptyOptional
instance containing a metadata parameter instance that can be assigned to the typeClass
passed in, or an emptyOptional
if no metadata can be assigned to that type.- Specified by:
findMetaParam
in interfaceMetaParam.Lookup
- Type Parameters:
T
- metadata parameter type
-