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 throwsNoSuchElementExceptionif 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, waitMethods inherited from interface org.infinispan.functional.EntryView.ReadEntryView
find, get, key, peekMethods inherited from interface org.infinispan.functional.EntryView.WriteEntryView
keyMethods inherited from interface org.infinispan.functional.MetaParam.Lookup
findMetaParam
-
Constructor Details
-
ReadWriteSnapshotView
-
-
Method Details
-
set
Description copied from interface:EntryView.WriteEntryViewSet this value along with optional metadata parameters.This method returns
Voidinstead of 'void' to avoid having to add overloaded methods in functional map that takeConsumerinstead ofFunction. This is an unfortunate side effect of the Java language itself which does not consider 'void' to be anObject.- Specified by:
setin interfaceEntryView.WriteEntryView<K,V>
-
set
Description copied from interface:EntryView.WriteEntryViewSet this value along with metadata object.This method returns
Voidinstead of 'void' to avoid having to add overloaded methods in functional map that takeConsumerinstead ofFunction. This is an unfortunate side effect of the Java language itself which does not consider 'void' to be anObject.- Specified by:
setin interfaceEntryView.WriteEntryView<K,V>
-
remove
Description copied from interface:EntryView.WriteEntryViewRemoves the value and any metadata parameters associated with it.This method returns
Voidinstead of 'void' to avoid having to add overloaded methods in functional map that takeConsumerinstead ofFunction. This is an unfortunate side effect of the Java language itself which does not consider 'void' to be anObject.- Specified by:
removein interfaceEntryView.WriteEntryView<K,V>
-
toString
-
key
Description copied from interface:EntryView.ReadEntryViewKey of the read-only entry view. Guaranteed to return a non-null value. The instance of the key must not be mutated.- Specified by:
keyin interfaceEntryView.ReadEntryView<K,V>
-
get
Description copied from interface:EntryView.ReadEntryViewReturns a non-null value if the key has a value associated with it or throwsNoSuchElementExceptionif 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:
getin interfaceEntryView.ReadEntryView<K,V> - Throws:
NoSuchElementException- if no value is associated with the key.
-
find
Description copied from interface:EntryView.ReadEntryViewOptional 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:
findin interfaceEntryView.ReadEntryView<K,V>
-
findMetaParam
Description copied from interface:MetaParam.LookupReturns a non-emptyOptionalinstance containing a metadata parameter instance that can be assigned to the typeClasspassed in, or an emptyOptionalif no metadata can be assigned to that type.- Specified by:
findMetaParamin interfaceMetaParam.Lookup- Type Parameters:
T- metadata parameter type
-