|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SimpleCache
An interface defining basic operation for caching data.
Method Summary | |
---|---|
String |
createId(String rootName,
String semanticType,
String syntaxType,
long lastModified,
Properties props)
Create a unique ID from the given parameters. |
boolean |
existsInCache(String id)
Is the object identified by its 'id' already cached? |
Object |
getContents(String id)
Return 'data' identified by 'id'. |
void |
removeFromCache(String id)
Remove cached object identified by its 'id' from the cache. |
void |
setContents(String id,
Object data)
Store/cache 'data' identified by 'id'. |
Method Detail |
---|
String createId(String rootName, String semanticType, String syntaxType, long lastModified, Properties props)
rootName
- is some high level name of the cached objectsemanticType
- is yet another feature of the cached objectsyntaxType
- is another property of the cached object
(e.i. it may be used as the file name suffix if the cache is
implemented as a filesystem)lastModified
- is time in millis indicating when the
cached object was created or modifiedprops
- are all remaining properties identifying the
cached object
boolean existsInCache(String id)
id
- a unique ID of the cached (or possibly cached) object
Object getContents(String id) throws IOException
id
- a unique ID of the object being returned
IOExcepiton
- if the retrieving failed
IOException
void setContents(String id, Object data) throws IOException
id
- a unique ID of the object being storeddata
- are being stored
IOExcepiton
- if the storing failed
IOException
void removeFromCache(String id) throws IOException
id
- a unique ID
IOException
- if the object exists but cannot be removed
(meaning that it does not raise any exception if the
object is not anymore in the cache)
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |