mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Add ReplicableEntry.dropChangeFor(remoteIdentifier)
This commit is contained in:
@@ -380,6 +380,10 @@ public class ReplicatedChronicleMap<K, V, R> extends VanillaChronicleMap<K, V, R
|
||||
}
|
||||
}
|
||||
|
||||
public void dropChangeFor(long tierIndex, long pos, byte remoteIdentifier) {
|
||||
acquireModificationIterator(remoteIdentifier).dropChange0(tierIndex, pos);
|
||||
}
|
||||
|
||||
public void moveChange(long oldTierIndex, long oldPos, long newTierIndex, long newPos) {
|
||||
if (oldTierIndex <= actualSegments) {
|
||||
long oldSegmentIndex = oldTierIndex - 1;
|
||||
@@ -899,5 +903,19 @@ public class ReplicatedChronicleMap<K, V, R> extends VanillaChronicleMap<K, V, R
|
||||
raiseChangeInTierBulk(bulkIndex, offsetToTierBitSet, pos);
|
||||
}
|
||||
}
|
||||
|
||||
void dropChange0(long tierIndex, long pos) {
|
||||
if (tierIndex <= actualSegments) {
|
||||
long segmentIndex = tierIndex - 1;
|
||||
long offsetToTierBitSet = segmentIndex * tierModIterBitSetOuterSize;
|
||||
dropChangeInSegment(offsetToTierBitSet, pos);
|
||||
} else {
|
||||
long extraTierIndex = tierIndex - 1 - actualSegments;
|
||||
int bulkIndex = (int) (extraTierIndex >> log2TiersInBulk);
|
||||
long offsetToTierBitSet =
|
||||
(extraTierIndex & (tiersInBulk - 1)) * tierModIterBitSetOuterSize;
|
||||
dropChangeInTierBulk(bulkIndex, offsetToTierBitSet, pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user