mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-155 added a kvContext.dontPutOnClose(); to imporve performance on aquireUsing(key,value)
This commit is contained in:
@@ -383,11 +383,15 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
|
||||
return this.lookupUsing(key, usingValue, LockType.READ_LOCK);
|
||||
}
|
||||
|
||||
// todo remove
|
||||
|
||||
@Override
|
||||
public V acquireUsing(K key, V usingValue) {
|
||||
|
||||
try (Context<K, V> kvContext = lookupUsing(key, usingValue, LockType.WRITE_LOCK)) {
|
||||
try (WriteContext<K, V> kvContext = lookupUsing(key, usingValue, LockType.WRITE_LOCK)) {
|
||||
|
||||
if (!isNativeValueClass)
|
||||
kvContext.dontPutOnClose();
|
||||
|
||||
return kvContext.value();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user