Package org.opennms.core.cache
Class Cache<K,V>
- java.lang.Object
-
- org.opennms.core.cache.Cache<K,V>
-
public class Cache<K,V> extends 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 Vget(K key)Vget(K key, Callable<? extends V> valueLoader)VgetIfCached(K key)voidinvalidateAll()voidput(K key, V value)voidrefresh(K key)
-
-
-
Constructor Detail
-
Cache
public Cache(CacheConfig config, com.google.common.cache.CacheLoader<K,V> cacheLoader)
-
-
Method Detail
-
get
public V get(K key) throws ExecutionException
- Throws:
ExecutionException
-
get
public V get(K key, Callable<? extends V> valueLoader) throws ExecutionException
- Throws:
ExecutionException
-
invalidateAll
public void invalidateAll()
-
refresh
public void refresh(K key)
-
-