public abstract class MapEntryOperationsDelegation<K,V,R> extends Object implements MapContext<K,V,R>
| Constructor and Description |
|---|
MapEntryOperationsDelegation() |
| Modifier and Type | Method and Description |
|---|---|
Data<V> |
defaultValue(MapAbsentEntry<K,V> absentEntry)
Returns the "nil" value, which should be inserted into the map, in the given
absentEntry context. |
R |
insert(MapAbsentEntry<K,V> absentEntry,
Data<V> value)
Inserts the new entry into the map, of
the key from
the given insertion context (absentEntry) and the given value. |
R |
remove(MapEntry<K,V> entry)
Removes the given entry from the map.
|
R |
replaceValue(MapEntry<K,V> entry,
Data<V> newValue)
Replaces the given entry's value with the new one.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithash, map, wrapValueAsData, wrapValueBytesAsDatasetinsert, removepublic R replaceValue(@NotNull MapEntry<K,V> entry, Data<V> newValue)
MapEntryOperationsentry.doReplaceValue(newValue) and returns null.replaceValue in interface MapEntryOperations<K,V,R>entry - the entry to replace the value inMapMethods implementationpublic R remove(@NotNull MapEntry<K,V> entry)
MapEntryOperationsMapEntry.doRemove() on the given entry
and returns null.remove in interface MapEntryOperations<K,V,R>entry - the entry to removeMapMethods implementationpublic Data<V> defaultValue(@NotNull MapAbsentEntry<K,V> absentEntry)
DefaultValueProviderabsentEntry context. This is primarily used in ChronicleMap.acquireUsing(K, V)
operation implementation, i. e. MapMethods.acquireUsing(net.openhft.chronicle.map.MapQueryContext<K, V, R>, net.openhft.chronicle.map.ReturnValue<V>).
The default implementation simply delegates to MapAbsentEntry.defaultValue().
defaultValue in interface DefaultValueProvider<K,V>public R insert(@NotNull MapAbsentEntry<K,V> absentEntry, Data<V> value)
MapEntryOperationsthe key from
the given insertion context (absentEntry) and the given value.
Note: default implementation calls absentEntry.doInsert(value) and returns null.insert in interface MapEntryOperations<K,V,R>MapMethods implementationCopyright © 2024. All rights reserved.