| com.hp.hpl.jena.db.impl.ICache
All known Subclasses: com.hp.hpl.jena.db.impl.LRUCache, com.hp.hpl.jena.db.impl.SimpleCache,
ICache | public interface ICache (Code) | | 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.
author: Dave Reynolds version: $Revision: 1.7 $ on $Date: 2008/01/02 12:08:24 $ |
Method Summary | |
public Object | get(IDBID id) | public int | getLimit() Return the current threshold limit for the cache size. | public void | put(IDBID id, Object val) | public void | setLimit(int threshold) Set a threshold for the cache size in terms of the count of cache entries. |
get | public Object get(IDBID id)(Code) | | Retreive an object from the cache
Parameters: id - the database ID of the object to be retrieved the object or null if it is not in the cache |
getLimit | public int getLimit()(Code) | | Return the current threshold limit for the cache size.
|
put | public void put(IDBID id, Object val)(Code) | | Add an entry to the cache
Parameters: id - the database ID to be used as an index Parameters: val - the literal or resources to be stored |
setLimit | public void setLimit(int threshold)(Code) | | Set a threshold for the cache size in terms of the count of cache entries.
For literals a storage limit rather than a count might be more useful but
counts are easier, more general and sufficient for the current use.
Parameters: threshold - the cache size limit, use 0 for no cache, -1 forunlimited cache growth; any other number indicates the number of cache entries |
|
|