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 Class
getClassByOidClass(Class oidType)
Gets the Class instance corresponding to given oidType.PersistenceConfig
getPersistenceConfig(Class pcClass)
Get the PersistenceConfig for given pcClass.void
notifyApplicationUnloaded(ClassLoader classLoader)
This method is called when an application is unloaded.void
setVersionConsistencyCache(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:
getPersistenceConfig
in 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:
getClassByOidClass
in interfaceConfigCache
- Parameters:
oidType
- The input oidType.- Returns:
- The Class instance corresponding to given oidType.
-
notifyApplicationUnloaded
public void notifyApplicationUnloaded(ClassLoader classLoader)
Description copied from interface:ApplicationLifeCycleEventListener
This method is called when an application is unloaded.- Specified by:
notifyApplicationUnloaded
in interfaceApplicationLifeCycleEventListener
- Parameters:
classLoader
- classLoader used to load the application
-
setVersionConsistencyCache
public void setVersionConsistencyCache(VersionConsistencyCache vcCache)
Sets VersionConsistencyCache field.- Specified by:
setVersionConsistencyCache
in interfaceConfigCache
- Parameters:
vcCache
- the VersionConsistencyCache instance.
-
-