public interface Cache<K,V>
Modifier and Type | Method and Description |
---|---|
V |
get(Object key)
Deprecated.
Use
lookup(Object) instead. |
int |
getMaxCacheSize()
Return the maximum cache Size.
|
V |
lookup(K key)
Returns the value of the specified key, or
null . |
V |
put(K key,
V value)
Put a value in the cache.
|
void |
setMaxCacheSize(int size)
Set the maximum cache size.
|
V put(K key, V value)
key
- the key of the value.value
- the value.null
.@Deprecated V get(Object key)
lookup(Object)
instead.null
.key
- the key.null
.V lookup(K key)
null
.key
- the key.null
.int getMaxCacheSize()
void setMaxCacheSize(int size)
size
- the new maximum cache size.