public interface ILRUCache<K,V>
| Modifier and Type | Method and Description |
|---|---|
long |
getApproximateMemoryUsage() |
V |
getIfPresent(K key)
Get a value from cache if present (already loaded)
|
void |
invalidateAll()
Discards all entries in the cache.
|
V |
load(K key,
Callable<V> loader)
Get cached valued by key or load and cache loaded value.
|
V load(K key, Callable<V> loader) throws ExecutionException
key - cache keyloader - key value loaderExecutionException - if load has any exception.long getApproximateMemoryUsage()
V getIfPresent(K key)
key - cache keyvoid invalidateAll()
Copyright © 2011–2020. All rights reserved.