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 aConcurrentHashMapwhich 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 voidclear()VcomputeIfAbsent(K key, Function<? super K,? extends V> computingFunction)VcomputeIfAbsent(K key, Supplier<V> supplier)voidforEachEntry(BiConsumer<? super K,? super V> action)voidforEachExistingValue(Consumer<? super V> action)voidforEachValue(Consumer<? super V> action)Set<V>getPresentValues()VgetValue(K key)VgetValueIfPresent(K key)booleanisEmpty()Vremove(K key)
-
-
-
Constructor Detail
-
ComputingCache
public ComputingCache()
Note thatgetValue(Object)cannot be used if no default computing function is specified.
-
-