Class ConfigCacheImpl
- java.lang.Object
-
- com.sun.jdo.spi.persistence.support.sqlstore.model.ConfigCacheImpl
-
- All Implemented Interfaces:
ConfigCache,ApplicationLifeCycleEventListener
public class ConfigCacheImpl extends Object implements ConfigCache, ApplicationLifeCycleEventListener
Caches SQLStore config information.- Author:
- Mitesh Meswani
-
-
Constructor Summary
Constructors Constructor Description ConfigCacheImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassgetClassByOidClass(Class oidType)Gets the Class instance corresponding to given oidType.PersistenceConfiggetPersistenceConfig(Class pcClass)Get the PersistenceConfig for given pcClass.voidnotifyApplicationUnloaded(ClassLoader classLoader)This method is called when an application is unloaded.voidsetVersionConsistencyCache(VersionConsistencyCache vcCache)Sets VersionConsistencyCache field.
-
-
-
Field Detail
-
logger
protected static final Logger logger
The logger.
-
-
Method Detail
-
getPersistenceConfig
public PersistenceConfig getPersistenceConfig(Class pcClass)
Get the PersistenceConfig for given pcClass. The config is looked up from a cache. If a config can not be found in cache, a new instance is created and returned.- Specified by:
getPersistenceConfigin interfaceConfigCache- Parameters:
pcClass- The input pcClass.- Returns:
- PersistenceConfig for given pcClass.
-
getClassByOidClass
public Class getClassByOidClass(Class oidType)
Gets the Class instance corresponding to given oidType.- Specified by:
getClassByOidClassin interfaceConfigCache- Parameters:
oidType- The input oidType.- Returns:
- The Class instance corresponding to given oidType.
-
notifyApplicationUnloaded
public void notifyApplicationUnloaded(ClassLoader classLoader)
Description copied from interface:ApplicationLifeCycleEventListenerThis method is called when an application is unloaded.- Specified by:
notifyApplicationUnloadedin interfaceApplicationLifeCycleEventListener- Parameters:
classLoader- classLoader used to load the application
-
setVersionConsistencyCache
public void setVersionConsistencyCache(VersionConsistencyCache vcCache)
Sets VersionConsistencyCache field.- Specified by:
setVersionConsistencyCachein interfaceConfigCache- Parameters:
vcCache- the VersionConsistencyCache instance.
-
-