public final class ConcurrencyUtil extends Object
ConcurrentMap
with a ConstructorFunction
.Modifier and Type | Method and Description |
---|---|
static <K,V> V |
getOrPutIfAbsent(ConcurrentMap<K,V> map,
K key,
ConstructorFunction<K,V> func) |
static <K,V> V |
getOrPutSynchronized(ConcurrentMap<K,V> map,
K key,
ContextMutexFactory contextMutexFactory,
ConstructorFunction<K,V> func) |
static <K,V> V |
getOrPutSynchronized(ConcurrentMap<K,V> map,
K key,
Object mutex,
ConstructorFunction<K,V> func) |
static boolean |
setIfEqualOrGreaterThan(AtomicLong oldValue,
long newValue) |
static <E> void |
setMax(E obj,
AtomicLongFieldUpdater<E> updater,
long value)
Atomically sets the max value.
|
public static <E> void setMax(E obj, AtomicLongFieldUpdater<E> updater, long value)
public static boolean setIfEqualOrGreaterThan(AtomicLong oldValue, long newValue)
public static <K,V> V getOrPutSynchronized(ConcurrentMap<K,V> map, K key, Object mutex, ConstructorFunction<K,V> func)
public static <K,V> V getOrPutSynchronized(ConcurrentMap<K,V> map, K key, ContextMutexFactory contextMutexFactory, ConstructorFunction<K,V> func)
public static <K,V> V getOrPutIfAbsent(ConcurrentMap<K,V> map, K key, ConstructorFunction<K,V> func)
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.