|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache<K,V>
The base interface for a cache implementation.
| Field Summary | |
|---|---|
static int |
DEFAULT_CACHE_CAPACITY
The default capacity of an object cache. |
| Method Summary | |
|---|---|
void |
add(K key,
V value)
Add a key-value-pair to the cache. |
int |
capacity()
|
void |
clear()
Remove all elements from the cache. |
V |
get(K key)
Query a value from the cache by its key. |
void |
remove(K key)
Remove a key-value-pair from the cache. |
| Field Detail |
|---|
static final int DEFAULT_CACHE_CAPACITY
| Method Detail |
|---|
void add(K key,
V value)
IllegalArgumentException - if the key is null.V get(K key)
IllegalArgumentException - if the key is null.void remove(K key)
IllegalArgumentException - if the key is null.int capacity()
void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||