public abstract class ReplicatedMapSegmentIteration<K,V,R> extends MapSegmentIteration<K,V,R> implements net.openhft.chronicle.map.impl.ReplicatedIterationContext<K,V,R>, net.openhft.chronicle.hash.replication.ReplicableEntry, net.openhft.chronicle.hash.ReplicatedHashSegmentContext<K,MapEntry<K,V>>
checkOnEachPublicOperation, entryRemovedOnThisIteration, hashLookupEntry, hlp, s| Constructor and Description |
|---|
ReplicatedMapSegmentIteration() |
| Modifier and Type | Method and Description |
|---|---|
void |
doInsert() |
void |
doInsert(Data<V> value) |
void |
doRemove()
Removes the entry from the
ChronicleHash. |
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. |
Object |
entryForIteration() |
boolean |
forEachSegmentEntryWhile(Predicate<? super MapEntry<K,V>> predicate)
Checks the given predicate on each present entry in this segment until all entries have been processed or the predicate returns
false for some entry, or throws an Exception. |
void |
forEachSegmentReplicableEntry(Consumer<? super net.openhft.chronicle.hash.replication.ReplicableEntry> action) |
boolean |
forEachSegmentReplicableEntryWhile(Predicate<? super net.openhft.chronicle.hash.replication.ReplicableEntry> predicate) |
boolean |
shouldTestEntry() |
long |
tierEntriesForIteration() |
context, hookAfterEachIterationcheckEntryNotRemovedOnThisIteration, forEachSegmentEntry, forEachTierEntryWhile, hashLookupEntryInit, initEntryRemovedOnThisIteration, initHashLookupEntry, innerForEachSegmentEntryWhile, iterationRemoveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadExistingEntryinitSegmentIndex, pos, recoverSegmentsforEachSegmentEntry, sizeisClosedcreatedHere, throwExceptionIfClosed, warnAndCloseIfNotClosedclose, closeQuietly, closeQuietlyhash, map, wrapValueAsData, wrapValueBytesAsDatasetinsert, removeinsert, remove, replaceValuedefaultValuepublic boolean shouldTestEntry()
shouldTestEntry in class HashSegmentIteration<K,MapEntry<K,V>>public Object entryForIteration()
entryForIteration in class HashSegmentIteration<K,MapEntry<K,V>>public long tierEntriesForIteration()
tierEntriesForIteration in class HashSegmentIteration<K,MapEntry<K,V>>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>doReplaceValue in class MapSegmentIteration<K,V,R>newValue - the value to be put into the map instead of the current
valuepublic boolean forEachSegmentEntryWhile(Predicate<? super MapEntry<K,V>> predicate)
HashSegmentContextfalse for some entry, or throws an Exception. Exceptions thrown by the predicate are relayed to the caller.
If this segment is empty (i. e. HashSegmentContext.size() call returns 0), this method returns
true immediately.
forEachSegmentEntryWhile in interface HashSegmentContext<K,MapEntry<K,V>>forEachSegmentEntryWhile in class HashSegmentIteration<K,MapEntry<K,V>>predicate - the predicate to be checked for each entry in this segmenttrue if the predicate returned true for all checked entries, false if it returned false for some entrypublic boolean forEachSegmentReplicableEntryWhile(Predicate<? super net.openhft.chronicle.hash.replication.ReplicableEntry> predicate)
public void forEachSegmentReplicableEntry(Consumer<? super net.openhft.chronicle.hash.replication.ReplicableEntry> action)
public void doRemove()
HashEntryChronicleHash.public void doRemoveCompletely()
net.openhft.chronicle.hash.replication.ReplicableEntryMapEntry.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.ReplicableEntryChronicleHashBuilderPrivateAPI.cleanupRemovedEntries(boolean),
ChronicleHashBuilderPrivateAPI.removedEntryCleanupTimeout(long, TimeUnit)public void doInsert()
Copyright © 2024. All rights reserved.