org.onebusaway.container.spring.ehcache
Class EhCacheConfigurationFactoryBean

java.lang.Object
  extended by org.onebusaway.container.spring.ehcache.EhCacheConfigurationFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

public class EhCacheConfigurationFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

Spring 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.

Author:
bdferris
See Also:
EhCacheFactoryBean, EhCacheManagerFactoryBean

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
EhCacheConfigurationFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 Object getObject()
           
 Class<?> getObjectType()
           
 boolean isSingleton()
           
 void setConfigLocation(org.springframework.core.io.Resource configLocation)
           
 void setDiskStorePath(File diskStorePath)
           
 void setTerracottaUrl(String terracottaUrl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

EhCacheConfigurationFactoryBean

public EhCacheConfigurationFactoryBean()
Method Detail

setConfigLocation

public void setConfigLocation(org.springframework.core.io.Resource configLocation)

setDiskStorePath

public void setDiskStorePath(File diskStorePath)

setTerracottaUrl

public void setTerracottaUrl(String terracottaUrl)

afterPropertiesSet

public void afterPropertiesSet()
                        throws IOException,
                               net.sf.ehcache.CacheException
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
IOException
net.sf.ehcache.CacheException

getObject

public Object getObject()
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean


Copyright © 2011 OneBusAway. All Rights Reserved.