Example usage for Java com.google.common.cache Cache fields, constructors, methods, implement or subclass
The text is from its open source code.
ConcurrentMap | asMap() Returns a view of the entries stored in this cache as a thread-safe map. |
void | cleanUp() Performs any pending maintenance operations needed by the cache. |
V | get(K key, Callable extends V> valueLoader) Returns the value associated with key in this cache, obtaining that value from valueLoader if necessary. |
V | getIfPresent(Object key) Returns the value associated with key in this cache, or null if there is no cached value for key . |
void | invalidate(Object key) Discards any cached value for key key . |
void | invalidateAll() Discards all entries in the cache. |
void | invalidateAll(Iterable> keys) Discards any cached values for keys keys . |
void | put(K key, V value) Associates value with key in this cache. |
void | putAll(Map extends K, ? extends V> m) Copies all of the mappings from the specified map to the cache. |
long | size() Returns the approximate number of entries in this cache. |
CacheStats | stats() Returns a current snapshot of this cache's cumulative statistics. |