|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SimpleFileCache
An interface extending basic operations for caching data by pointing users directly to files with cached objects or for cached objects. This allows to use such files directly by other classes or even by external processes. Of course, the implementation should make sure that nobody is stepping on others toes.
Method Summary | |
---|---|
String |
getFilename(String id)
Return a fully qualified path to a file that represents the cached object identified by the 'id'. |
String |
getURL(String id)
Return a full URL allowing to retrieve a cached object identified by its 'id'. |
void |
removeOlderThen(long millis)
Remove all cached objects that are in cache longer that specifies by 'millis'. |
void |
setContents(String id,
byte[] data)
Store 'data' as an object identified by 'id'. |
Methods inherited from interface org.biomoby.client.SimpleCache |
---|
createId, existsInCache, getContents, removeFromCache, setContents |
Method Detail |
---|
String getFilename(String id) throws IOException
id
- a unique ID of the cached (or possibly cached) object
IOException
- if creating the parent directories caused problemvoid setContents(String id, byte[] data) throws IOException
id
- a unique ID of the object being storeddata
- are being stored
IOExcepiton
- if the storing failed
IOException
String getURL(String id)
id
- a unique IDvoid removeOlderThen(long millis) throws IOException
millis
- how many milliseconds must be an object stored to
be remopved by calling this method
IOException
- if any object that exists in the cache and
is targeted to be removed but cannot be removed
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |