Select OF_4_BYTES for Byteable values. (possibly OF_8_BYTES in the future)

This commit is contained in:
Peter Lawrey
2014-11-01 09:26:38 +00:00
parent 8e9aba6b77
commit 9a6af6a6fb
6 changed files with 27 additions and 11 deletions
@@ -764,6 +764,13 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
V acquire(ThreadLocalCopies copies, MKI metaKeyInterop, KI keyInterop, K key, V usingValue,
long hash2, boolean create) {
V v = acquire0(copies, metaKeyInterop, keyInterop, key, usingValue, hash2, false);
if (create && v == null)
v = acquire0(copies, metaKeyInterop, keyInterop, key, usingValue, hash2, true);
return v;
}
V acquire0(ThreadLocalCopies copies, MKI metaKeyInterop, KI keyInterop, K key, V usingValue,
long hash2, boolean create) {
if (create)
writeLock();
else