public abstract class ReplicatedMapEntryStages<K,V> extends MapEntryStages<K,V> implements net.openhft.chronicle.map.replication.MapReplicableEntry<K,V>
allocatedChunks, entryValue, valueOffset, valueSize, valueSizeOffsetcheckOnEachPublicOperation, checksumStrategy, delayedUpdateChecksum, entryKey, entrySizeInChunks, hh, hlp, keyOffset, keySize, keySizeOffset, pos, s| Constructor and Description |
|---|
ReplicatedMapEntryStages() |
| Modifier and Type | Method and Description |
|---|---|
void |
dropChanged()
Suppress the entry, if it was scheduled to be replicated over to all remote Chronicle nodes.
|
void |
dropChangedFor(byte remoteIdentifier)
Suppress the entry, if it was scheduled to be replicated over to the remote Chronicle node
with the specified identifier.
|
boolean |
entryDeleted() |
boolean |
isChanged()
Check is the entry is scheduled to be replicated to the remote Chronicle nodes, to which
the connection is currently established.
|
byte |
originIdentifier()
The identifier, associated with this entry.
|
long |
originTimestamp()
The timestamp of the last update to this entry.
|
void |
raiseChanged()
Propagate the entry, schedule it to be replicated over to all remote Chronicle nodes.
|
void |
raiseChangedFor(byte remoteIdentifier)
Propagate the entry, schedule it to be replicated over to the remote Chronicle node with
the specified identifier.
|
void |
raiseChangedForAllExcept(byte remoteIdentifier)
Propagate the entry, schedule it to be replicated over to all remote Chronicle nodes, except
the node with the specified identifier.
|
protected void |
relocation(Data<V> newValue,
long newEntrySize) |
long |
timestamp() |
void |
updatedReplicationStateOnAbsentEntry() |
void |
updatedReplicationStateOnPresentEntry() |
void |
updateOrigin(byte newIdentifier,
long newTimestamp)
Overwrite the entry's associated identifier and timestamp.
|
void |
writeEntryDeleted() |
void |
writeEntryPresent() |
entryEnd, entrySize, freeExtraAllocatedChunks, initValue, innerDefaultReplaceValue, innerEntrySize, newEntrySize, newSizeOfEverythingBeforeValue, value, writeValuecheckSum, closeDelayedUpdateChecksum, closeEntry, closeEntryOffset, closeKeyOffset, closeKeySize, closePos, copyExistingEntry, entryOffsetInit, initDelayedUpdateChecksum, initEntryOffset, initEntryOffset, initEntrySizeInChunks, initKeyOffset, initKeySize, initPos, innerRemoveEntryExceptHashLookupUpdate, key, keyEnd, readExistingEntry, readFoundEntry, updateChecksum, writeNewEntryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontext, doRemove, doReplaceValue, valuepublic long timestamp()
public boolean entryDeleted()
entryDeleted in class MapEntryStages<K,V>public void writeEntryPresent()
public void writeEntryDeleted()
public byte originIdentifier()
net.openhft.chronicle.hash.replication.ReplicableEntryChronicleHash node on which this entry was updated last.
When the entry is replicated, this identifier comes to remote nodes as RemoteOperationContext.remoteIdentifier().
On ChronicleHash local operations with entries, like Map.put(
Object, Object), this identifier is overwritten to the own ChronicleHash Replica.identifier(). On remote operations, proxied through MapRemoteOperations or
SetRemoteOperations, you are free to overwrite this identifier to any value, using
ReplicableEntry.updateOrigin(byte, long) method.
originIdentifier in interface net.openhft.chronicle.hash.replication.ReplicableEntrypublic long originTimestamp()
net.openhft.chronicle.hash.replication.ReplicableEntry
When the entry is replicated, this timestamp comes to remote nodes as RemoteOperationContext.remoteTimestamp().
originTimestamp in interface net.openhft.chronicle.hash.replication.ReplicableEntryTimeProviderpublic void updateOrigin(byte newIdentifier,
long newTimestamp)
net.openhft.chronicle.hash.replication.ReplicableEntryReplicableEntry.originIdentifier() returns the given newIdentifier and ReplicableEntry.originTimestamp()
returns the given newTimestamp respectively.updateOrigin in interface net.openhft.chronicle.hash.replication.ReplicableEntrynewIdentifier - the new identifier for the entrynewTimestamp - the new timestamp for the entrypublic void dropChanged()
net.openhft.chronicle.hash.replication.ReplicableEntrydropChanged in interface net.openhft.chronicle.hash.replication.ReplicableEntrypublic void dropChangedFor(byte remoteIdentifier)
net.openhft.chronicle.hash.replication.ReplicableEntrydropChangedFor in interface net.openhft.chronicle.hash.replication.ReplicableEntrypublic void raiseChanged()
net.openhft.chronicle.hash.replication.ReplicableEntryraiseChanged in interface net.openhft.chronicle.hash.replication.ReplicableEntrypublic void raiseChangedFor(byte remoteIdentifier)
net.openhft.chronicle.hash.replication.ReplicableEntryraiseChangedFor in interface net.openhft.chronicle.hash.replication.ReplicableEntryremoteIdentifier - the identifier of the node to replicate this entry topublic void raiseChangedForAllExcept(byte remoteIdentifier)
net.openhft.chronicle.hash.replication.ReplicableEntryraiseChangedForAllExcept in interface net.openhft.chronicle.hash.replication.ReplicableEntryremoteIdentifier - the identifier of the node not to replicate this entry topublic boolean isChanged()
net.openhft.chronicle.hash.replication.ReplicableEntryisChanged in interface net.openhft.chronicle.hash.replication.ReplicableEntrytrue is the entry is "dirty" locally, i. e. should be replicated to any of
remote Chronicle nodes, false otherwisepublic void updatedReplicationStateOnPresentEntry()
public void updatedReplicationStateOnAbsentEntry()
protected void relocation(Data<V> newValue, long newEntrySize)
relocation in class MapEntryStages<K,V>Copyright © 2024. All rights reserved.