org.onebusaway.container.spring.ehcache
public class EhCacheConfigurationFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<net.sf.ehcache.config.Configuration>, org.springframework.beans.factory.InitializingBean
FactoryBean
for creating an EhCache Configuration
that
supports programmatic DiskStore and Terracotta configuration.
A special note about Terracotta config. While you can create all your
Terracotta-enabled caches programatically using this FactoryBean, you need to
have at least one Terracotta-enabled cache created the old fashioned way
(through an ehcache.xml
resource config) so that the
CacheManager
will properly enable Terracotta support.EhCacheFactoryBean
,
EhCacheManagerFactoryBean
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
Constructor and Description |
---|
EhCacheConfigurationFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
net.sf.ehcache.config.Configuration |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setConfigLocation(org.springframework.core.io.Resource configLocation) |
void |
setDiskStorePath(File diskStorePath) |
void |
setTerracottaUrl(String terracottaUrl) |
public void setConfigLocation(org.springframework.core.io.Resource configLocation)
public void setDiskStorePath(File diskStorePath)
public void setTerracottaUrl(String terracottaUrl)
public void afterPropertiesSet() throws IOException, net.sf.ehcache.CacheException
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
IOException
net.sf.ehcache.CacheException
public net.sf.ehcache.config.Configuration getObject()
getObject
in interface org.springframework.beans.factory.FactoryBean<net.sf.ehcache.config.Configuration>
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<net.sf.ehcache.config.Configuration>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<net.sf.ehcache.config.Configuration>
Copyright © 2014 OneBusAway. All Rights Reserved.