HCOLL-155 removed acquireUsingReadLocked and acquireUsingWriteLocked to WriteContext<K,V> acquireUsingLocked(@NotNull K key, @NotNull V usingValue); and ReadContext<K,V> getUsingLocked(@NotNull K key, @NotNull V usingValue);

This commit is contained in:
Rob Austin
2014-11-02 18:35:26 +00:00
parent 55e50d40a3
commit ef0cd0f96f
10 changed files with 297 additions and 152 deletions
@@ -255,7 +255,7 @@ class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
return (Segment) segments[segmentNum];
}
LockedEntry<K, V> acquireUsing(K key, V value, LockType lockTypeType) {
<T extends Context> T lookupUsing(K key, V value, LockType lockTypeType) {
checkKey(key);
ThreadLocalCopies copies = keyInteropProvider.getCopies(null);
KI keyInterop = keyInteropProvider.get(copies, originalKeyInterop);
@@ -285,10 +285,12 @@ class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
v = value;
}
//todo set dirty when using replication on
lock.value(v);
lock.key(key);
return lock;
return (T) lock;
}