public class CacheFactory
extends org.springframework.cache.ehcache.EhCacheFactoryBean
implements org.springframework.context.ApplicationContextAware
Constructor and Description |
---|
CacheFactory() |
Modifier and Type | Method and Description |
---|---|
net.sf.ehcache.Ehcache |
createCache(net.sf.ehcache.event.CacheEventListener... listeners) |
net.sf.ehcache.Ehcache |
getObject()
Return an instance (possibly shared or independent) of the object
managed by this factory.
|
protected void |
registerAll(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.event.CacheEventListener... l) |
void |
setApplicationContext(org.springframework.context.ApplicationContext arg0)
Set the ApplicationContext that this object runs in.
|
void |
setCacheEventListeners(net.sf.ehcache.event.CacheEventListener[] listeners) |
afterPropertiesSet, createCache, decorateCache, getObjectType, isSingleton, setBeanName, setBlocking, setBootstrapCacheLoader, setCacheEntryFactory, setCacheEventListeners, setCacheManager, setCacheName, setClearOnFlush, setDiskExpiryThreadIntervalSeconds, setDiskPersistent, setDiskSpoolBufferSize, setEternal, setMaxElementsInMemory, setMaxElementsOnDisk, setMemoryStoreEvictionPolicy, setOverflowToDisk, setTimeToIdle, setTimeToLive
public void setApplicationContext(org.springframework.context.ApplicationContext arg0) throws org.springframework.beans.BeansException
org.springframework.context.ApplicationContextAware
Invoked after population of normal bean properties but before an init callback such
as InitializingBean.afterPropertiesSet()
or a custom init-method. Invoked after ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader)
,
ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)
and
MessageSourceAware
, if applicable.
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
arg0
- the ApplicationContext object to be used by this objectorg.springframework.context.ApplicationContextException
- in case of context initialization errorsorg.springframework.beans.BeansException
- if thrown by application context methodsBeanInitializationException
public void setCacheEventListeners(net.sf.ehcache.event.CacheEventListener[] listeners)
public net.sf.ehcache.Ehcache getObject()
org.springframework.beans.factory.FactoryBean
As with a BeanFactory
, this allows support for both the
Singleton and Prototype design pattern.
If this FactoryBean is not fully initialized yet at the time of
the call (for example because it is involved in a circular reference),
throw a corresponding FactoryBeanNotInitializedException
.
As of Spring 2.0, FactoryBeans are allowed to return null
objects. The factory will consider this as normal value to be used; it
will not throw a FactoryBeanNotInitializedException in this case anymore.
FactoryBean implementations are encouraged to throw
FactoryBeanNotInitializedException themselves now, as appropriate.
getObject
in interface org.springframework.beans.factory.FactoryBean<net.sf.ehcache.Ehcache>
getObject
in class org.springframework.cache.ehcache.EhCacheFactoryBean
null
)FactoryBeanNotInitializedException
public net.sf.ehcache.Ehcache createCache(net.sf.ehcache.event.CacheEventListener... listeners)
protected void registerAll(net.sf.ehcache.Ehcache cache, net.sf.ehcache.event.CacheEventListener... l)
Version: 5.1.3-ice35-b52
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.