Class InfinispanEmbeddedCacheManagerFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<EmbeddedCacheManager>
,org.springframework.beans.factory.InitializingBean
A
for creating an
FactoryBean
instance. The location of the Infinispan configuration file used to provide the default
Infinispan EmbeddedCacheManager
configuration
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
.
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
destroy()
Shuts down theEmbeddedCacheManager
instance created by thisFactoryBean
.Class<? extends EmbeddedCacheManager>
boolean
Always returnstrue
.Methods inherited from class org.infinispan.spring.embedded.AbstractEmbeddedCacheManagerFactory
addCustomCacheConfiguration, addCustomGlobalConfiguration, createBackingEmbeddedCacheManager, setConfigurationFileLocation
-
Constructor Details
-
InfinispanEmbeddedCacheManagerFactoryBean
public InfinispanEmbeddedCacheManagerFactoryBean()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
- See Also:
-
InitializingBean.afterPropertiesSet()
-
getObject
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<EmbeddedCacheManager>
- Throws:
Exception
- See Also:
-
FactoryBean.getObject()
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<EmbeddedCacheManager>
- See Also:
-
FactoryBean.getObjectType()
-
isSingleton
public boolean isSingleton()Always returnstrue
.- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<EmbeddedCacheManager>
- Returns:
- Always
true
- See Also:
-
FactoryBean.isSingleton()
-
destroy
Shuts down theEmbeddedCacheManager
instance created by thisFactoryBean
.- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
- See Also:
-
DisposableBean.destroy()
Lifecycle.stop()
-