mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
reverted back to allow acquireUsing to be passsed a NULL value
This commit is contained in:
@@ -173,7 +173,7 @@ public interface ChronicleMap<K, V> extends ConcurrentMap<K, V>, ChronicleHash {
|
||||
* @return value to which the given key is mapping after this call, either found or created
|
||||
* @see #getUsing(Object, Object)
|
||||
*/
|
||||
V acquireUsing(@NotNull K key, @NotNull V usingValue);
|
||||
V acquireUsing(@NotNull K key, V usingValue);
|
||||
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -391,7 +391,7 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable {
|
||||
}
|
||||
|
||||
|
||||
public synchronized V acquireUsing(@NotNull K key, @NotNull V usingValue) {
|
||||
public synchronized V acquireUsing(@NotNull K key, V usingValue) {
|
||||
throw new UnsupportedOperationException("acquireUsing() is not supported for stateless " +
|
||||
"clients");
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
|
||||
|
||||
|
||||
@Override
|
||||
public V acquireUsing(@NotNull K key, @NotNull V usingValue) {
|
||||
public V acquireUsing(@NotNull K key, V usingValue) {
|
||||
|
||||
try (WriteContext<K, V> kvContext =
|
||||
lookupUsing(key, usingValue, LockType.WRITE_LOCK, false)) {
|
||||
@@ -856,7 +856,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
|
||||
}
|
||||
|
||||
V acquireWithoutLock(ThreadLocalCopies copies, MKI metaKeyInterop, KI keyInterop, K key, V usingValue,
|
||||
long hash2, boolean create) {
|
||||
long hash2, boolean create) {
|
||||
long keySize = metaKeyInterop.size(keyInterop, key);
|
||||
MultiStoreBytes entry = acquireTmpBytes();
|
||||
long offset = searchKey(keyInterop, metaKeyInterop, key, keySize, hash2, entry,
|
||||
|
||||
Reference in New Issue
Block a user