public class MapAccess
extends java.lang.Object
| Constructor and Description |
|---|
MapAccess() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V,W extends V> |
computeIfAbsent(java.util.concurrent.ConcurrentMap<K,V> map,
K k,
java.util.function.Function<? super K,? extends W> f)
This method should be used instead of the
ConcurrentMap.computeIfAbsent(Object, Function) call to minimize
thread contention. |
public static <K,V,W extends V> W computeIfAbsent(java.util.concurrent.ConcurrentMap<K,V> map,
K k,
java.util.function.Function<? super K,? extends W> f)
ConcurrentMap.computeIfAbsent(Object, Function) call to minimize
thread contention. This method does not require locking for the common case
where the key exists, but potentially performs additional computation when
absent.