public abstract class MapQuery<K,V,R> extends HashQuery<K> implements MapEntry<K,V>, ExternalMapQueryContext<K,V,R>, ExternalSetQueryContext<K,R>, net.openhft.chronicle.map.impl.QueryContextInterface<K,V,R>, MapAndSetContext<K,V,R>
HashQuery.EntryPresence| Modifier and Type | Field and Description |
|---|---|
MapAbsent<K,V> |
absent |
AcquireHandle<K,V> |
acquireHandle |
DefaultReturnValue<V> |
defaultReturnValue |
UsingReturnValue<V> |
usingReturnValue |
checkOnEachPublicOperation, entry, hashLookupSearch, hh, hlp, s| Constructor and Description |
|---|
MapQuery() |
| Modifier and Type | Method and Description |
|---|---|
Absent<K,V> |
absentEntry()
Returns the special absent entry object, if the entry with the queried key
is absent in the hash, returns
null, if the entry is present. |
MapQuery<K,V,R> |
context()
Returns the context, in which the entry is accessed.
|
void |
doReplaceValue(Data<V> newValue)
Replaces the entry's value with the given
newValue. |
MapQuery<K,V,R> |
entry()
Returns the entry context, if the entry with the queried key is present
in the
ChronicleHash, returns null is the entry is absent. |
Data<K> |
getInputKeyBytesAsData(net.openhft.chronicle.bytes.BytesStore<?,?> bytesStore,
long offset,
long size) |
DataAccess<V> |
inputValueDataAccess() |
protected void |
putPrefix() |
doRemove, dropSearchIfNestedContextsAndPresentHashLookupSlotCheckFailed, entryPresent, initPresenceOfEntry, inputKeyDataAccess, queriedKeyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireHandle, defaultReturnValue, initInputKey, initSegmentIndex, inputKeyDataAccess, segmentIndexInit, usingReturnValuemap, wrapValueAsData, wrapValueBytesAsDatainsert, remove, replaceValuedefaultValueclosequeriedKey, segmentIndexreadLock, updateLock, writeLockpublic AcquireHandle<K,V> acquireHandle
public DefaultReturnValue<V> defaultReturnValue
public UsingReturnValue<V> usingReturnValue
public DataAccess<V> inputValueDataAccess()
public MapQuery<K,V,R> entry()
HashQueryContextChronicleHash, returns null is the entry is absent.
Might acquire InterProcessReadWriteUpdateLock.readLock() before searching for the key, if the context
is not locked yet.entry in interface HashQueryContext<K>entry in interface MapQueryContext<K,V,R>entry in interface SetQueryContext<K,R>@Nullable public Absent<K,V> absentEntry()
HashQueryContextnull, if the entry is present.
Might acquire InterProcessReadWriteUpdateLock.readLock() before searching for the key, if the context
is not locked yet.absentEntry in interface HashQueryContext<K>absentEntry in interface MapQueryContext<K,V,R>absentEntry in interface SetQueryContext<K,R>protected void putPrefix()
public void doReplaceValue(Data<V> newValue)
MapEntrynewValue.
This method is the default implementation for MapEntryOperations.replaceValue(
MapEntry, Data), which might be customized over the default.
doReplaceValue in interface MapEntry<K,V>newValue - the value to be put into the map instead of the current
value@NotNull public MapQuery<K,V,R> context()
HashEntryCopyright © 2024. All rights reserved.