|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Cache
A Cache let the user store key-value-pairs in a permanent manner and access them. It is possible that a client uses get() before load() therefore the implementation must ensure that no error occurred because of the wrong order. The implementing class should implement a useful toString() method.
| Method Summary | |
|---|---|
void |
delete()
Deletes the cache. |
java.lang.Object |
get(java.lang.Object key)
Returns a value for a given key from the cache. |
boolean |
isValid()
Checks its prerequisites. |
java.util.Iterator<java.lang.String> |
iterator()
Returns an iterator over the keys in the cache. |
void |
load()
Loads the cache, must handle not existing cache. |
void |
put(java.lang.Object key,
java.lang.Object value)
Saves a key-value-pair in the cache. |
void |
save()
Saves modification of the cache. |
| Method Detail |
|---|
boolean isValid()
void delete()
void load()
void save()
java.lang.Object get(java.lang.Object key)
key - the key
void put(java.lang.Object key,
java.lang.Object value)
key - the keyvalue - the valuejava.util.Iterator<java.lang.String> iterator()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||