Class Cache<K,​V>


  • public class Cache<K,​V>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Cache​(CacheConfig config, com.google.common.cache.CacheLoader<K,​V> cacheLoader)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      V get​(K key)  
      V get​(K key, java.util.concurrent.Callable<? extends V> valueLoader)  
      V getIfCached​(K key)  
      void invalidateAll()  
      void put​(K key, V value)  
      void refresh​(K key)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Cache

        public Cache​(CacheConfig config,
                     com.google.common.cache.CacheLoader<K,​V> cacheLoader)
    • Method Detail

      • get

        public V get​(K key)
              throws java.util.concurrent.ExecutionException
        Throws:
        java.util.concurrent.ExecutionException
      • get

        public V get​(K key,
                     java.util.concurrent.Callable<? extends V> valueLoader)
              throws java.util.concurrent.ExecutionException
        Throws:
        java.util.concurrent.ExecutionException
      • getIfCached

        public V getIfCached​(K key)
      • invalidateAll

        public void invalidateAll()
      • refresh

        public void refresh​(K key)
      • put

        public void put​(K key,
                        V value)