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
ConstructorDescriptionNote thatgetValue(Object)
cannot be used if no default computing function is specified.ComputingCache
(Function<K, V> computingFunction) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
computeIfAbsent
(K key, Function<? super K, ? extends V> computingFunction) computeIfAbsent
(K key, Supplier<V> supplier) void
forEachEntry
(BiConsumer<? super K, ? super V> action) void
forEachExistingValue
(Consumer<? super V> action) void
forEachValue
(Consumer<? super V> action) getValueIfPresent
(K key) boolean
isEmpty()
-
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()
-