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 a ConcurrentHashMap which intentionally does not use Map.computeIfAbsent(Object, Function) and is reentrant. Derived from org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.
  • Constructor Details

    • ComputingCache

      public ComputingCache()
      Note that getValue(Object) cannot be used if no default computing function is specified.
    • ComputingCache

      public ComputingCache(Function<K,V> computingFunction)
  • Method Details

    • getValue

      public V getValue(K key)
    • getValueIfPresent

      public V getValueIfPresent(K key)
    • computeIfAbsent

      public V computeIfAbsent(K key, Function<? super K,? extends V> computingFunction)
    • computeIfAbsent

      public V computeIfAbsent(K key, Supplier<V> supplier)
    • remove

      public V remove(K key)
    • clear

      public void clear()
    • forEachValue

      public void forEachValue(Consumer<? super V> action)
    • forEachExistingValue

      public void forEachExistingValue(Consumer<? super V> action)
    • getPresentValues

      public Set<V> getPresentValues()
    • forEachEntry

      public void forEachEntry(BiConsumer<? super K,? super V> action)
    • isEmpty

      public boolean isEmpty()