|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface signature for cache implementations. Instances of this are used to cache resources and literals loaded from a database.
The type of the stored objects is left generic in case other caches are needed but could specialize it to RDFNodes.
| Method Summary | |
java.lang.Object |
get(IDBID id)
Retreive an object from the cache |
int |
getLimit()
Return the current threshold limit for the cache size. |
void |
put(IDBID id,
java.lang.Object val)
Add an entry to the cache |
void |
setLimit(int threshold)
Set a threshold for the cache size in terms of the count of cache entries. |
| Method Detail |
public void put(IDBID id,
java.lang.Object val)
id - the database ID to be used as an indexval - the literal or resources to be storedpublic java.lang.Object get(IDBID id)
id - the database ID of the object to be retrieved
public void setLimit(int threshold)
threshold - the cache size limit, use 0 for no cache, -1 for
unlimited cache growth; any other number indicates the number of cache entriespublic int getLimit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||