public class LoadingCache<K,V> extends SimpleProxyCache<K,V>
| 构造器和说明 |
|---|
LoadingCache(Cache<K,V> cache) |
| 限定符和类型 | 方法和说明 |
|---|---|
V |
get(K key)
Gets an entry from the cache.
|
Map<K,V> |
getAll(Set<? extends K> keys)
Gets a collection of entries from the Cache, returning them as Map of the values associated with
the set of keys requested.
|
close, computeIfAbsent, computeIfAbsent, computeIfAbsent, config, GET_ALL, GET, getTargetCache, PUT_ALL, PUT_ALL, PUT_IF_ABSENT, put, PUT, put, PUT, putAll, putAll, putIfAbsent, REMOVE_ALL, remove, REMOVE, removeAll, tryLock, tryLockAndRun, unwrappublic V get(K key) throws CacheInvokeException
CacheIf 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 returnedCacheInvokeException - only if loader throws an exceptionCacheLoader,
Cache.GET(Object)public Map<K,V> getAll(Set<? extends K> keys) throws CacheInvokeException
CacheIf 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.CacheInvokeException - only if loader throws an exceptionCacheLoader,
Cache.GET_ALL(Set)Copyright © 2013–2019. All rights reserved.