public final class LoadingCacheUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <K,V> V |
getCacheValue(LoadingCache<K,V> cache,
K key)
Get the cache value for the given key.
|
static <T,K,V> T |
getCastCacheValue(LoadingCache<K,V> cache,
Object key)
Get and cast the cache value for the given key.
|
public static <K,V> V getCacheValue(LoadingCache<K,V> cache, K key)
K - Key typeV - Value typecache - key - ExecutionError - if an error is thrown while loading the valuepublic static <T,K,V> T getCastCacheValue(LoadingCache<K,V> cache, Object key)
T - Required typeK - Key typeV - Value typecache - key - ExecutionError - if an error is thrown while loading the valueCopyright © 2015. All Rights Reserved.