Interface Cache
- All Known Implementing Classes:
PropertiesfileCache
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.
- Since:
- Ant 1.6
- Version:
- 2003-09-13
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Deletes the cache.Returns a value for a given key from the cache.boolean
isValid()
Checks its prerequisites.iterator()
Returns an iterator over the keys in the cache.void
load()
Loads the cache, must handle not existing cache.void
Saves a key-value-pair in the cache.void
save()
Saves modification of the cache.
-
Method Details
-
isValid
boolean isValid()Checks its prerequisites.- Returns:
- true if all is ok, otherwise false.
-
delete
void delete()Deletes the cache. If file based the file has to be deleted also. -
load
void load()Loads the cache, must handle not existing cache. -
save
void save()Saves modification of the cache. -
get
-
put
-
iterator
-