K
- type of the key to identify a cached value.V
- type of the cached value.public class SmallDataCache<K,V> extends Object implements Cache<K,V>
Cache.invalidate(Object)
or Cache.clear()
is called.Constructor and Description |
---|
SmallDataCache()
Creates a new
Cache . |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the cache.
|
V |
get(K key)
Gets a value from the cache.
|
Collection<V> |
getContent()
Gets the cache's content.
|
void |
invalidate(K key)
Invalidates a key.
|
void |
put(K key,
V value)
Puts a value into the cache.
|
public SmallDataCache()
Cache
.public void put(K key, V value)
Cache
public void invalidate(K key)
Cache
invalidate
in interface Cache<K,V>
key
- key to invalidate.public void clear()
Cache
public Collection<V> getContent()
Copyright © 2015. All Rights Reserved.