Class BlockingBasicCacheDecorator<K,V>
java.lang.Object
org.wildfly.clustering.cache.infinispan.AbstractBasicCacheDecorator<K,V>
org.wildfly.clustering.cache.infinispan.BlockingBasicCacheDecorator<K,V>
- Type Parameters:
K- cache key typeV- cache value type
- All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K, V>, org.infinispan.commons.api.AsyncCache<K, V>, org.infinispan.commons.api.BasicCache<K, V>, org.infinispan.commons.api.Lifecycle
- Direct Known Subclasses:
RemoteCacheDecorator
A
BasicCache decorator for cache implementations whose synchronous methods always block.
Synchronous operations will delegating to asynchronous methods and wait for result.- Author:
- Paul Ferraro
-
Nested Class Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBlockingBasicCacheDecorator(org.infinispan.commons.api.BasicCache<K, V> cache, Duration timeout) Creates a cache decorator -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit) computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) booleancontainsKey(Object key) protected <T> Tjoin(CompletableFuture<T> future) Returns the value from the specified future.merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) put(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) voidvoidvoidputAll(Map<? extends K, ? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) putIfAbsent(K key, V value) putIfAbsent(K key, V value, long lifespan, TimeUnit unit) putIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) booleanreplace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) booleanbooleanbooleanreplace(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) intsize()Methods inherited from class AbstractBasicCacheDecorator
clearAsync, computeAsync, computeAsync, computeAsync, computeIfAbsentAsync, computeIfAbsentAsync, computeIfAbsentAsync, computeIfPresentAsync, computeIfPresentAsync, computeIfPresentAsync, containsKeyAsync, containsValue, continuousQuery, entrySet, equals, getAllAsync, getAsync, getName, getVersion, hashCode, isEmpty, keySet, mergeAsync, mergeAsync, mergeAsync, putAllAsync, putAllAsync, putAllAsync, putAsync, putAsync, putAsync, putIfAbsentAsync, putIfAbsentAsync, putIfAbsentAsync, query, removeAsync, removeAsync, replaceAsync, replaceAsync, replaceAsync, replaceAsync, replaceAsync, replaceAsync, sizeAsync, start, stop, valuesMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConcurrentMap
forEach, getOrDefault, replaceAll
-
Constructor Details
-
BlockingBasicCacheDecorator
-
-
Method Details
-
join
Returns the value from the specified future. Default behaviour waits indefinitely.- Type Parameters:
T- the future value type- Parameters:
future- a future value- Returns:
- the value from the specified future.
-
clear
public void clear() -
containsKey
-
compute
-
compute
-
compute
-
computeIfAbsent
-
computeIfAbsent
-
computeIfAbsent
-
computeIfPresent
-
computeIfPresent
-
computeIfPresent
-
get
-
merge
-
merge
-
merge
-
put
-
put
-
put
-
putAll
-
putAll
-
putAll
-
putIfAbsent
-
putIfAbsent
-
putIfAbsent
-
remove
-
remove
-
replace
-
replace
-
replace
-
replace
-
replace
-
replace
-
size
public int size()
-