Package io.quarkus.arc.impl
Class ComputingCache<K,V>
java.lang.Object
io.quarkus.arc.impl.ComputingCache<K,V>
- Type Parameters:
K-V-
Computing cache backed by a
ConcurrentHashMap which intentionally does not use
Map.computeIfAbsent(Object, Function) and is reentrant.
Derived from org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.-
Constructor Summary
ConstructorsConstructorDescriptionNote thatgetValue(Object)cannot be used if no default computing function is specified.ComputingCache(Function<K, V> computingFunction) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()computeIfAbsent(K key, Function<? super K, ? extends V> computingFunction) computeIfAbsent(K key, Supplier<V> supplier) voidforEachEntry(BiConsumer<? super K, ? super V> action) voidforEachExistingValue(Consumer<? super V> action) voidforEachValue(Consumer<? super V> action) getValueIfPresent(K key) booleanisEmpty()
-
Constructor Details
-
ComputingCache
public ComputingCache()Note thatgetValue(Object)cannot be used if no default computing function is specified. -
ComputingCache
-
-
Method Details
-
getValue
-
getValueIfPresent
-
computeIfAbsent
-
computeIfAbsent
-
remove
-
clear
public void clear() -
forEachValue
-
forEachExistingValue
-
getPresentValues
-
forEachEntry
-
isEmpty
public boolean isEmpty()
-