public final class LoadingCacheUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <K,V> V |
getCacheValue(com.google.common.cache.LoadingCache<K,V> cache,
K key)
Get the cache value for the given key.
|
static <K,V> V |
getCacheValue(com.google.common.cache.LoadingCache<K,V> cache,
K key,
boolean wrapExecutionProblem)
Get the cache value for the given key.
|
static <T,K,V> T |
getCastCacheValue(com.google.common.cache.LoadingCache<K,V> cache,
Object key)
Get and cast the cache value for the given key.
|
static <T,K,V> T |
getCastCacheValue(com.google.common.cache.LoadingCache<K,V> cache,
Object key,
boolean wrapExecutionProblem)
Get and cast the cache value for the given key.
|
public static <K,V> V getCacheValue(com.google.common.cache.LoadingCache<K,V> cache,
K key)
ExecutionException and UncheckedExecutionException.K - Key typeV - Value typecache - key - WeldException - if an expection is thrown while loading the valuecom.google.common.util.concurrent.ExecutionError - if an error is thrown while loading the valuepublic static <K,V> V getCacheValue(com.google.common.cache.LoadingCache<K,V> cache,
K key,
boolean wrapExecutionProblem)
ExecutionException and UncheckedExecutionException.K - Key typeV - Value typecache - key - wrapExecutionProblem - If true, wrap possible ExecutionException and
UncheckedExecutionException, otherwise UncheckedExecutionException may be thrown when execution
problem occurscom.google.common.util.concurrent.ExecutionError - if an error is thrown while loading the valuepublic static <T,K,V> T getCastCacheValue(com.google.common.cache.LoadingCache<K,V> cache,
Object key)
T - Required typeK - Key typeV - Value typecache - key - WeldException - if an expection is thrown while loading the valuecom.google.common.util.concurrent.ExecutionError - if an error is thrown while loading the valuepublic static <T,K,V> T getCastCacheValue(com.google.common.cache.LoadingCache<K,V> cache,
Object key,
boolean wrapExecutionProblem)
T - Required typeK - Key typeV - Value typecache - key - wrapExecutionProblem - If true, wrap possible ExecutionException and
UncheckedExecutionException, otherwise UncheckedExecutionException may be thrown when execution
problem occurscom.google.common.util.concurrent.ExecutionError - if an error is thrown while loading the valueCopyright © 2013 Seam Framework. All Rights Reserved.