Class EhCacheManagerFactoryBean
- java.lang.Object
-
- org.onebusaway.container.spring.ehcache.EhCacheManagerFactoryBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<net.sf.ehcache.CacheManager>,org.springframework.beans.factory.InitializingBean
public class EhCacheManagerFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<net.sf.ehcache.CacheManager>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
* A SpringFactoryBeanfor programmatically creating an EhCacheCacheManager, specifically allowing us to pass in aConfigurationdirectly. The existing factory bean implementation provided by Spring directly does not allow one to programmatically specify theConfigurationdirectly, which makes it difficult to dynamically configure the cache using a spring application context config.- Author:
- bdferris
- See Also:
EhCacheConfigurationFactoryBean,EhCacheFactoryBean
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Loglogger
-
Constructor Summary
Constructors Constructor Description EhCacheManagerFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voiddestroy()net.sf.ehcache.CacheManagergetObject()Class<?>getObjectType()booleanisSingleton()voidsetCacheManagerName(String cacheManagerName)Set the name of the EHCache CacheManager (if a specific name is desired).voidsetConfigLocation(org.springframework.core.io.Resource configLocation)voidsetConfiguration(net.sf.ehcache.config.Configuration configuration)
-
-
-
Method Detail
-
setConfigLocation
public void setConfigLocation(org.springframework.core.io.Resource configLocation)
-
setConfiguration
public void setConfiguration(net.sf.ehcache.config.Configuration configuration)
-
setCacheManagerName
public void setCacheManagerName(String cacheManagerName)
Set the name of the EHCache CacheManager (if a specific name is desired).- See Also:
net.sf.ehcache.CacheManager#setName(String)
-
afterPropertiesSet
public void afterPropertiesSet() throws IOException, net.sf.ehcache.CacheException- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
IOExceptionnet.sf.ehcache.CacheException
-
getObject
public net.sf.ehcache.CacheManager getObject()
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<net.sf.ehcache.CacheManager>
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<net.sf.ehcache.CacheManager>
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<net.sf.ehcache.CacheManager>
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
-