类 LoadingCache<K,V>

java.lang.Object
com.alicp.jetcache.SimpleProxyCache<K,V>
com.alicp.jetcache.LoadingCache<K,V>
所有已实现的接口:
Cache<K,V>, ProxyCache<K,V>, Closeable, AutoCloseable
直接已知子类:
RefreshCache

public class LoadingCache<K,V> extends SimpleProxyCache<K,V>
Created on 2017/5/17.
作者:
huangli
  • 构造器详细资料

    • LoadingCache

      public LoadingCache(Cache<K,V> cache)
  • 方法详细资料

    • get

      public V get(K key) throws CacheInvokeException
      从接口复制的说明: Cache
      Gets an entry from the cache.

      If the cache's builder has specified a CacheLoader and there is no association in the cache , it will attempt to load the entry.

      If error occurs during cache access, the method return null instead of throwing an exception.

      指定者:
      get 在接口中 Cache<K,V>
      覆盖:
      get 在类中 SimpleProxyCache<K,V>
      参数:
      key - the key whose associated value is to be returned
      返回:
      the associated value. null may indicates:
      • the entry does not exist or expired
      • the entry value is null
      • error occurs during cache access(no exception throws)
      抛出:
      CacheInvokeException - only if loader throws an exception
      另请参阅:
    • getAll

      public Map<K,V> getAll(Set<? extends K> keys) throws CacheInvokeException
      从接口复制的说明: Cache
      Gets a collection of entries from the Cache, returning them as Map of the values associated with the set of keys requested.

      If the cache's builder has specified a CacheLoader and there is no association in the cache , it will attempt to load the entry.

      If error occurs during cache access, the method will not throw an exception.

      指定者:
      getAll 在接口中 Cache<K,V>
      覆盖:
      getAll 在类中 SimpleProxyCache<K,V>
      参数:
      keys - The keys whose associated values are to be returned.
      返回:
      A map of entries that were found for the given keys. Keys not found in the cache are not in the returned map.
      抛出:
      CacheInvokeException - only if loader throws an exception
      另请参阅: