public class GuavaLocalCache<K,V> extends Object implements LocalCache<K,V>
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.cache.Cache<K,V> |
cache |
| Constructor and Description |
|---|
GuavaLocalCache(com.google.common.cache.Cache<K,V> cache) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp() |
V |
get(K key,
Callable<? extends V> loader) |
V |
getIfPresent(K key) |
void |
invalidate(K key) |
void |
invalidateAll() |
void |
invalidateAll(Iterable<?> keys) |
void |
put(K key,
V value) |
long |
size() |
public V get(K key, Callable<? extends V> loader)
get in interface LocalCache<K,V>public V getIfPresent(K key)
getIfPresent in interface LocalCache<K,V>public void invalidate(K key)
invalidate in interface LocalCache<K,V>public void invalidateAll(Iterable<?> keys)
invalidateAll in interface LocalCache<K,V>public void invalidateAll()
invalidateAll in interface LocalCache<K,V>public long size()
size in interface LocalCache<K,V>public void cleanUp()
cleanUp in interface LocalCache<K,V>Copyright © 2016–2021 Softelnet. All rights reserved.