public class SpringEmbeddedCacheManagerFactoryBean extends AbstractEmbeddedCacheManagerFactory implements org.springframework.beans.factory.FactoryBean<SpringEmbeddedCacheManager>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
A for creating an
FactoryBean instance. The location of the Infinispan configuration
file used to provide the default SpringEmbeddedCacheManagerconfiguration for
the EmbeddedCacheManager instance created by this FactoryBean is
configurable.
If no configuration file location is set the SpringEmbeddedCacheManager instance
created by this FactoryBean will use Infinispan's default settings. See Infinispan's
documentation for what those default settings
are.
A user may further customize the SpringEmbeddedCacheManager's configuration using
explicit setters on this FactoryBean. The properties thus defined will be applied
either to the configuration loaded from Infinispan's configuration file in case one has been
specified, or to a configuration initialized with Infinispan's default settings. Either way, the
net effect is that explicitly set configuration properties take precedence over both those loaded
from a configuration file as well as INFINISPAN's default settings.
In addition to creating an SpringEmbeddedCacheManager this FactoryBean
does also control that SpringEmbeddedCacheManager's
lifecycle by shutting it down when the enclosing
Spring application context is closed. It is therefore advisable to always use this
FactoryBean when creating an SpringEmbeddedCacheManager.
logger| Constructor and Description |
|---|
SpringEmbeddedCacheManagerFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy()
Shuts down the
SpringEmbeddedCacheManager instance created by this
FactoryBean. |
SpringEmbeddedCacheManager |
getObject() |
Class<? extends SpringEmbeddedCacheManager> |
getObjectType() |
boolean |
isSingleton()
Always returns
true. |
addCustomCacheConfiguration, addCustomGlobalConfiguration, createBackingEmbeddedCacheManager, setConfigurationFileLocationpublic SpringEmbeddedCacheManagerFactoryBean()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionInitializingBean.afterPropertiesSet()public SpringEmbeddedCacheManager getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBean<SpringEmbeddedCacheManager>ExceptionFactoryBean.getObject()public Class<? extends SpringEmbeddedCacheManager> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<SpringEmbeddedCacheManager>FactoryBean.getObjectType()public boolean isSingleton()
true.isSingleton in interface org.springframework.beans.factory.FactoryBean<SpringEmbeddedCacheManager>trueFactoryBean.isSingleton()public void destroy()
throws Exception
SpringEmbeddedCacheManager instance created by this
FactoryBean.destroy in interface org.springframework.beans.factory.DisposableBeanExceptionDisposableBean.destroy(),
SpringEmbeddedCacheManager.stop()Copyright © 2024 JBoss, a division of Red Hat. All rights reserved.