public interface Cache<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
delete all entries from the cache
|
void |
delete(K key)
delete a key-value pair from the cache
|
void |
deleteAll(List<K> keys)
delete one or more key-value pairs from the cache
|
V |
get(K key)
look up a value in the cache
|
Map<K,V> |
getAll(List<K> keys)
look up one or more values in the cache.
|
CacheEntry<V> |
getCacheEntry(K key)
look up a CacheEntry in the cache.
|
Stats |
getStatistics()
get cache statistics
|
void |
put(K key,
V value)
cache a key-value pair
|
void |
putAll(Map<K,V> map)
cache one or more key-value pairs
|
long |
size()
Return number of objects in cache
|
void clear()
void delete(K key)
key - key corresponding to valuevoid deleteAll(List<K> keys)
keys - iterable data structure containing the keys to deleteV get(K key)
key - key corresponding to valueMap<K,V> getAll(List<K> keys)
keys - iterable data structure containing the keys to look upCacheEntry<V> getCacheEntry(K key)
key - key corresponding to valueStats getStatistics()
void put(K key, V value)
key - key associated with valuevalue - value associated with keyvoid putAll(Map<K,V> map)
map - map containing key-value pairs to cachelong size()
Copyright © 2015. All rights reserved.