HCOLL-155 implemented lookupUsing(K key, V value, LockType lockTypeType) for ReplicatedVanChronMap

This commit is contained in:
Rob Austin
2014-11-04 16:53:39 +00:00
parent 2da3873fc7
commit 39cf492171
2 changed files with 21 additions and 22 deletions
@@ -420,7 +420,6 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
lock.metaKeyInterop = metaKeyInterop;
lock.keyInterop = keyInterop;
lock.segmentHash = segmentHash;
lock.value = null; // todo is this really needed?
if (!isNativeValueClass && lockTypeType == LockType.WRITE_LOCK && v == null)
v = value;
@@ -1419,8 +1418,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
@Override
public void removeEntry() {
if (copies != null)
removeWithoutLock(copies, metaKeyInterop, keyInterop, key(), null, segmentHash);
removeWithoutLock(copies, metaKeyInterop, keyInterop, key(), null, segmentHash);
}
}
@@ -1434,9 +1432,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
putWithoutLock(copies, metaKeyInterop, keyInterop, key(), value(),
segmentHash, true);
copies = null;
putOnClose = true;
Segment.this.writeUnlock();
}
@@ -1638,6 +1634,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
KI keyInterop;
long segmentHash;
private K key;
private V value;