HCOLL-81 make it clear that mapForKey is read only as it uses a Function and updateForKey is read/write and takes a mutator.

This commit is contained in:
Peter Lawrey
2014-11-15 12:56:37 +00:00
parent 80ba83a669
commit 3750bc4f8e
7 changed files with 120 additions and 35 deletions
@@ -250,7 +250,12 @@ public class ReplicationCheckingMap<K, V> implements ChronicleMap<K, V> {
}
@Override
public V acquireUsing(@NotNull K key, V usingValue) {
public <R> R updateForKey(K key, @NotNull Mutator<? super V, R> mutator) {
return map1.updateForKey(key, mutator);
}
@Override
public V acquireUsing(@NotNull K key, V usingValue) {
return map1.acquireUsing(key, usingValue);
}