| java.lang.Object org.openharmonise.rm.factory.CacheHandler
CacheHandler | public class CacheHandler (Code) | | This singleton class provides a single point of interface for the
caching of the core objects within Harmonise.
author: Michael Bell version: $Revision: 1.3 $ |
addToCache | public void addToCache(AbstractObject xobj) throws CacheException(Code) | | Adds the given object to the relevant cache.
Parameters: xobj - the object to be cached throws: CacheException - if there is an error either getting the correctcache or adding the object to the cache |
changeObject | public void changeObject(String key, String sType, Object newObj) throws CacheException(Code) | | Change object in the cache. This method notifies the appropriate cache
that a change has to take place to the object referenced by
key and possibly replaced by the new Object
newObj , depending on the code sType .
Parameters: key - the cache key of object in cache Parameters: sType - the type of change being made, see constants available Parameters: newObj - the new object to be placed in cache to replace object referenced by key , if appropriate throws: CacheException - if there is an error either gettting theappropriate cache or changing the object in the cache |
changeObject | public void changeObject(Object oldObj, String sType, Object newObj) throws CacheException(Code) | | Change object in the cache. This method notifies the appropriate
cache that a change has to take place to the object oldObj
and possibly replaced by the new Object newObj ,
depending on the code sType .
Parameters: oldObj - the object which is in cache Parameters: sType - The type of change being made, see constants available Parameters: newObj - the new object to be placed in cache to replace oldObj throws: CacheException - if there is an error either gettting theappropriate cache or changing the object in the cache |
getCache | public GeneralCache getCache(String sClassname) throws CacheException(Code) | | Returns the cache which corresponds to the specified class name.
Parameters: sClassname - the class name the cache which corresponds to the specified class name throws: CacheException - if there is an error creating the cache |
getCache | public GeneralCache getCache(Class clss) throws CacheException(Code) | | Returns the appropriate cache for the specified Class .
Parameters: clss - the Class to get cache for the appropriate cache for the Class throws: CacheException - if there is an error creating the cache |
getCacheList | public List getCacheList()(Code) | | Returns a list of the name of all caches this cache handler is
currently managing.
the list of all cache names |
getCachePointer | public CachePointer getCachePointer(AbstractObject obj) throws CacheException(Code) | | Returns the cache pointer which will reference the specified
object.
Parameters: obj - the object the cache pointer which will reference the specifiedobject throws: CacheException - if an error occurs accessing the appropriate cache |
getCaches | public List getCaches()(Code) | | Returns a list of all the caches this cache handler is
currently managing.
the list of all caches |
getInstance | public static synchronized CacheHandler getInstance(AbstractDataStoreInterface dbinterf)(Code) | | Returns the singleton instance of CacheHandler .
Parameters: dbinterf - the data store interface for the returned instance the singleton instance |
getObject | public Object getObject(String sClassname, int nId) throws CacheException(Code) | | Returns the object for the given class name and id.
Parameters: sClassname - the name of class of the object to be returned Parameters: nId - the id of object to be returned the object matching class and id throws: CacheException - if an error occurs getting object from the cache |
getObject | public Object getObject(String sClassname, String sKey) throws CacheException(Code) | | Returns an object for the given class and String cache key.
Parameters: sClassname - the name of class of the object to be returned Parameters: sKey - the cache key the object matching class and path throws: CacheException - if an error occurs getting object from the cache |
getObjectFromPath | public Object getObjectFromPath(String sClassname, String sPath) throws CacheException(Code) | | Returns an object for the given class name and path.
Parameters: sClassname - the name of class of the object to be returned Parameters: sPath - the path of object to be returned the object matching class and path throws: CacheException - if an error occurs getting object from the cache |
removeObjectFromCache | public void removeObjectFromCache(AbstractObject obj) throws CacheException(Code) | | Removes the specified object from the appropriate cache.
Parameters: obj - the object to remove throws: CacheException - if there is an error accessing the cache orremoving the object from it |
|
|