Package io.quarkus.arc.impl
Class ComputingCache<K,V>
- java.lang.Object
-
- io.quarkus.arc.impl.ComputingCache<K,V>
-
- Type Parameters:
K
-V
-
public class ComputingCache<K,V> extends Object
Computing cache backed by aConcurrentHashMap
which intentionally does not useMap.computeIfAbsent(Object, Function)
and is reentrant. Derived fromorg.jboss.weld.util.cache.ReentrantMapBackedComputingCache
.
-
-
Constructor Summary
Constructors Constructor Description ComputingCache()
Note thatgetValue(Object)
cannot be used if no default computing function is specified.ComputingCache(Function<K,V> computingFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
V
computeIfAbsent(K key, Function<? super K,? extends V> computingFunction)
V
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)
Set<V>
getPresentValues()
V
getValue(K key)
V
getValueIfPresent(K key)
boolean
isEmpty()
V
remove(K key)
-
-
-
Constructor Detail
-
ComputingCache
public ComputingCache()
Note thatgetValue(Object)
cannot be used if no default computing function is specified.
-
-