public class InfinispanEmbeddedCacheManagerFactoryBean extends AbstractEmbeddedCacheManagerFactory implements org.springframework.beans.factory.FactoryBean<org.infinispan.manager.EmbeddedCacheManager>, 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
Infinispan EmbeddedCacheManagerconfiguration for the
EmbeddedCacheManager instance created by this FactoryBean is
configurable.
If no configuration file location is set the EmbeddedCacheManager 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 EmbeddedCacheManager'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 INFNISPAN's default settings.
In addition to creating an EmbeddedCacheManager this FactoryBean does
also control that EmbeddedCacheManagers'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
EmbeddedCacheManager.
AbstractEmbeddedCacheManagerFactory.setConfigurationFileLocation(org.springframework.core.io.Resource),
destroy(),
EmbeddedCacheManager,
Configurationlogger| 构造器和说明 |
|---|
InfinispanEmbeddedCacheManagerFactoryBean() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
void |
destroy()
Shuts down the
EmbeddedCacheManager instance created by this
FactoryBean. |
org.infinispan.manager.EmbeddedCacheManager |
getObject() |
Class<? extends org.infinispan.manager.EmbeddedCacheManager> |
getObjectType() |
boolean |
isSingleton()
Always returns
true. |
addCustomCacheConfiguration, addCustomGlobalConfiguration, createBackingEmbeddedCacheManager, setConfigurationFileLocationpublic InfinispanEmbeddedCacheManagerFactoryBean()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanExceptionInitializingBean.afterPropertiesSet()public org.infinispan.manager.EmbeddedCacheManager getObject()
throws Exception
getObject 在接口中 org.springframework.beans.factory.FactoryBean<org.infinispan.manager.EmbeddedCacheManager>ExceptionFactoryBean.getObject()public Class<? extends org.infinispan.manager.EmbeddedCacheManager> getObjectType()
getObjectType 在接口中 org.springframework.beans.factory.FactoryBean<org.infinispan.manager.EmbeddedCacheManager>FactoryBean.getObjectType()public boolean isSingleton()
true.isSingleton 在接口中 org.springframework.beans.factory.FactoryBean<org.infinispan.manager.EmbeddedCacheManager>trueFactoryBean.isSingleton()Copyright © 2017 airlenet. All rights reserved.