Class Cache<V>

  • Type Parameters:
    V - the type of cached values

    public class Cache<V>
    extends Object
    Cache implementation which handles concurrent access to cached values.
    • Constructor Detail

      • Cache

        public Cache()
    • Method Detail

      • get

        public V get​(Cache.ValueHandler<V> valueHandler)
        Returns the value defined by the Cache.ValueHandler
        Parameters:
        valueHandler - which creates the key and the value if necessary
        Returns:
        the eventually cached value
      • clear

        public void clear()
        Clears the cache.