Field Summary |
|
final public static String | CHANGE_DELETE Constant indicating a change based on a delete action. |
final public static String | CHANGE_SAVE Constant indicating a change based on a save action. |
final public static String | CHANGE_TEMP Constant indicating a change based on an temporary action. |
final public static String | CHANGE_UPDATE Constant indicating a change based on an update action. |
final public static double | DEFAULT_CACHELIMIT_PERCENT Default percentage of the available memory that needs to be reached before
the cache sizes are automatically reduced. |
final public static double | DEFAULT_CACHEREDUCTION_RATIO Default percentage that cache sizes are reduced by when the memory limit
has been reached. |
final public static int | DEFAULT_CACHESIZE Default cache size. |
Method Summary |
|
protected Object | addToCache(Object key) Adds an object to the cache which corresponds to the given cache key,
calls getCacheableObject to get the object to cache. |
public void | addToCache(Object key, Object cacheable_object) Adds the cacheable_object to the cache with the given
cache key key . |
public void | changeObject(Object cache_key, String sChangeCode, Object newObject) Changes object in cache, depending on the change code sChangeCode
the object will be deleted from the cache or replaced with the new object
newObject . |
public static synchronized void | clearAllCaches() Clears all caches in system that extend this abstract cache class. |
public void | clearCache() Clears this cache. |
public boolean | containsKey(Object cache_key) Returns true if the given key is contained in the cache. |
public long | getAvgObjectSizeOfEstimate() Returns an estimate of the average size of an object in the cache. |
public Set | getCacheKeys() Returns a Set of cache keys. |
public int | getCacheMaxSize() Returns the current maximum size of the cache. |
public String | getCacheName() Returns the name of the cache. |
public int | getCacheSize() Returns the current cache size, taken from the Map that
contains all objects. |
public List | getCacheTopKeys(int num_favourites) Returns the list of keys for the most accessed objects of the size given. |
abstract protected Object | getCacheableObject(Object key) Returns a cacheable object from the given key. |
public Object | getObject(Object key) Returns cache object matching the given cache key. |
public CachePointer | getObjectPointer(Object key) Returns a pointer to the cached object referenced by the key. |
public boolean | isDependancyAware() Returns true if this cache will check an object for
dependancies before paging the object out. |
protected void | removeObjectFromCache(Object key) Removes object associated to the specified cache key from
the cache. |
public void | setCacheMaxSize(int maxSize) Sets the maximum cache size. |
public void | setDependancyAware(boolean bIsDepAware) Sets whether this cache checks objects for dependancies before
paging the object out. |