Class ConcurrentFixedCache<K,​V>


  • public final class ConcurrentFixedCache<K,​V>
    extends Object
    When we know that there is a finite number of keys, so we get just "cache" everything.

    factory may be called multiple times in case multiple threads try to init the same key at once.

    • Constructor Detail

      • ConcurrentFixedCache

        public ConcurrentFixedCache​(Function<K,​V> factory)
    • Method Detail

      • get

        public V get​(K key)