public class InfinispanRemoteCacheManagerFactoryBean extends AbstractRemoteCacheManagerFactory implements org.springframework.beans.factory.FactoryBean<RemoteCacheManager>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
A
for creating an
FactoryBean
instance.
Infinispan RemoteCacheManager
A RemoteCacheManager
is configured through a
object. For an exhaustive list of valid properties to be used see
Properties
RemoteCacheManager
's javadocs
. This FactoryBean
provides means to either
inject
a user-defined Properties
instance or to
set
the
location of a properties file to load those properties from. Note that it is illegal to
use both mechanisms simultaneously.
Alternatively or in combination with
setting
the
location of a Properties
file to load the configuration from, this
FactoryBean
provides (typed) setters for all configuration settings. Settings thus
defined take precedence over those defined in the injected Properties
instance. This
flexibility enables users to use e.g. a company-wide Properties
file containing
default settings while simultaneously overriding select settings whenever special requirements
warrant this.
Note that it is illegal to use setters in conjunction with
injecting
a Properties
instance.
In addition to creating a RemoteCacheManager
this FactoryBean
does also
control that RemoteCacheManagers
'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 a RemoteCacheManager
.
RemoteCacheManager
,
destroy()
logger, startAutomatically
Constructor and Description |
---|
InfinispanRemoteCacheManagerFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy()
the
RemoteCacheManager created by this factory. |
RemoteCacheManager |
getObject() |
Class<? extends RemoteCacheManager> |
getObjectType() |
boolean |
isSingleton()
Always return
true . |
assertCorrectlyConfigured, configurationProperties, setAsyncExecutorFactory, setConfigurationProperties, setConfigurationPropertiesFileLocation, setForceReturnValues, setKeySizeEstimate, setMarshaller, setPingOnStartup, setRequestBalancingStrategy, setServerList, setStartAutomatically, setTcpNoDelay, setTransportFactory, setValueSizeEstimate
public InfinispanRemoteCacheManagerFactoryBean()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
InitializingBean.afterPropertiesSet()
public RemoteCacheManager getObject() throws Exception
getObject
in interface org.springframework.beans.factory.FactoryBean<RemoteCacheManager>
Exception
FactoryBean.getObject()
public Class<? extends RemoteCacheManager> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<RemoteCacheManager>
FactoryBean.getObjectType()
public boolean isSingleton()
true
.isSingleton
in interface org.springframework.beans.factory.FactoryBean<RemoteCacheManager>
FactoryBean.isSingleton()
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.