public abstract class ReplicatedMapQuery<K,V,R> extends MapQuery<K,V,R> implements net.openhft.chronicle.map.replication.MapRemoteQueryContext<K,V,R>, net.openhft.chronicle.set.replication.SetRemoteQueryContext<K,R>, net.openhft.chronicle.hash.replication.ReplicableEntry, net.openhft.chronicle.map.replication.MapReplicableEntry<K,V>, net.openhft.chronicle.set.replication.SetReplicableEntry<K>
HashQuery.EntryPresence
absent, acquireHandle, defaultReturnValue, usingReturnValue
checkOnEachPublicOperation, entry, hashLookupSearch, hh, hlp, s
Constructor and Description |
---|
ReplicatedMapQuery() |
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. |
void |
doRemove()
Removes the entry from the
ChronicleSet . |
void |
doRemoveCompletely()
Completely remove the entry from the Chronicle hash, not just mark is as deleted, what
MapEntry.doRemove() does for Replicated Chronicle hash. |
void |
doReplaceValue(Data<V> newValue)
Replaces the entry's value with the given
newValue . |
ReplicatedMapQuery<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. |
boolean |
entryPresent() |
context, getInputKeyBytesAsData, inputValueDataAccess, putPrefix
dropSearchIfNestedContextsAndPresentHashLookupSlotCheckFailed, initPresenceOfEntry, inputKeyDataAccess, queriedKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dummyZeroValue
hash, map, wrapValueAsData, wrapValueBytesAsData
set
insert, remove
insert, remove, replaceValue
defaultValue
queriedKey, segmentIndex
readLock, updateLock, writeLock
currentNodeIdentifier, remoteIdentifier, remoteNodeIdentifier, remoteTimestamp
dropChanged, dropChangedFor, isChanged, originIdentifier, originTimestamp, raiseChanged, raiseChangedFor, raiseChangedForAllExcept, updateOrigin
acquireHandle, defaultReturnValue, initInputKey, initSegmentIndex, inputKeyDataAccess, segmentIndexInit, usingReturnValue
close
@Nullable public Absent<K,V> absentEntry()
HashQueryContext
null
, if the entry is present.absentEntry
in interface HashQueryContext<K>
absentEntry
in interface MapQueryContext<K,V,R>
absentEntry
in interface SetQueryContext<K,R>
absentEntry
in class MapQuery<K,V,R>
public boolean entryPresent()
entryPresent
in class HashQuery<K>
public ReplicatedMapQuery<K,V,R> entry()
HashQueryContext
ChronicleHash
, returns null
is the entry is absent.entry
in interface HashQueryContext<K>
entry
in interface MapQueryContext<K,V,R>
entry
in interface net.openhft.chronicle.map.replication.MapRemoteQueryContext<K,V,R>
entry
in interface net.openhft.chronicle.set.replication.SetRemoteQueryContext<K,R>
entry
in interface SetQueryContext<K,R>
entry
in class MapQuery<K,V,R>
public void doRemove()
SetEntry
ChronicleSet
.
This method is the default implementation for SetEntryOperations.remove(SetEntry)
,
which might be customized over the default.
public void doRemoveCompletely()
net.openhft.chronicle.hash.replication.ReplicableEntry
MapEntry.doRemove()
does for Replicated Chronicle hash. After calling this method
the entry won't be replicated over to remote Chronicle nodes, as if ReplicableEntry.dropChanged()
was called, and incoming entry replication event with the key if this entry will be
processed, as the entry have never been present in the Chronicle hash. After calling this
method any subsequent call of any method of ReplicableEntry
class throws IllegalStateException
.doRemoveCompletely
in interface net.openhft.chronicle.hash.replication.ReplicableEntry
ChronicleHashBuilderPrivateAPI.cleanupRemovedEntries(boolean)
,
ChronicleHashBuilderPrivateAPI.removedEntryCleanupTimeout(long, TimeUnit)
public void doReplaceValue(Data<V> newValue)
MapEntry
newValue
.
This method is the default implementation for MapEntryOperations.replaceValue(
MapEntry, Data)
, which might be customized over the default.
doReplaceValue
in interface MapEntry<K,V>
doReplaceValue
in class MapQuery<K,V,R>
newValue
- the value to be put into the map instead of the current
valueCopyright © 2022. All rights reserved.