com.hazelcast.util
Class ConcurrencyUtil
java.lang.Object
com.hazelcast.util.ConcurrencyUtil
public final class ConcurrencyUtil
- extends Object
Utility methods to getOrPutSynchronized and getOrPutIfAbsent in thread safe way
from ConcurrentMap with a ConstructorFunction .
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getOrPutSynchronized
public static <K,V> V getOrPutSynchronized(ConcurrentMap<K,V> map,
K key,
Object mutex,
ConstructorFunction<K,V> func)
getOrPutIfAbsent
public static <K,V> V getOrPutIfAbsent(ConcurrentMap<K,V> map,
K key,
ConstructorFunction<K,V> func)
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.