Interface Cache<K,​V>

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  Cache.UnboundAtomicMapCache<K,​V>
      Simple cache implementation based on atomic reference on unbound hash map.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      V get​(K key, java.util.function.Supplier<V> onMiss)
      Get the value from cache based by key.
    • Method Detail

      • get

        V get​(K key,
              java.util.function.Supplier<V> onMiss)
        Get the value from cache based by key.
        Parameters:
        key - Key to get a value from the cache
        onMiss - Supplier for a value in case it's missing in cache