Class SpringRemoteCacheManagerFactoryBean
- java.lang.Object
-
- org.infinispan.spring.AbstractRemoteCacheManagerFactory
-
- org.infinispan.spring.provider.SpringRemoteCacheManagerFactoryBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<SpringRemoteCacheManager>
,org.springframework.beans.factory.InitializingBean
public class SpringRemoteCacheManagerFactoryBean extends AbstractRemoteCacheManagerFactory implements org.springframework.beans.factory.FactoryBean<SpringRemoteCacheManager>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
A
Configuration
for creating anFactoryBean
instance.SpringRemoteCacheManager
A
SpringRemoteCacheManager
is configured through a
object. For an exhaustive list of valid properties to be used seeProperties
RemoteCacheManager
'sjavadocs
. ThisFactoryBean
provides means to eitherinject
a user-definedProperties
instance or toset
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 aProperties
file to load the configuration from, thisFactoryBean
provides (typed) setters for all configuration settings. Settings thus defined take precedence over those defined in the injectedProperties
instance. This flexibility enables users to use e.g. a company-wideProperties
file containing default settings while simultaneously overriding select settings whenever special requirements warrant this.
Note that it is illegal to use setters in conjunction withinjecting
aProperties
instance.In addition to creating a
SpringRemoteCacheManager
thisFactoryBean
does also control thatSpringRemoteCacheManager
's lifecycle by shutting it down when the enclosing Spring application context is closed. It is therefore advisable to always use thisFactoryBean
when creating anSpringRemoteCacheManager
.- Author:
- Olaf Bergner
- See Also:
RemoteCacheManager
,destroy()
-
-
Field Summary
-
Fields inherited from class org.infinispan.spring.AbstractRemoteCacheManagerFactory
logger, startAutomatically
-
-
Constructor Summary
Constructors Constructor Description SpringRemoteCacheManagerFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
destroy()
thestop
RemoteCacheManager
created by this factory.SpringRemoteCacheManager
getObject()
Class<? extends SpringRemoteCacheManager>
getObjectType()
boolean
isSingleton()
Always returntrue
.-
Methods inherited from class org.infinispan.spring.AbstractRemoteCacheManagerFactory
assertCorrectlyConfigured, configurationProperties, setAsyncExecutorFactory, setConfigurationProperties, setConfigurationPropertiesFileLocation, setForceReturnValues, setKeySizeEstimate, setMarshaller, setNearCacheMaxEntries, setNearCacheMode, setNearCacheNamePattern, setReadTimeout, setRequestBalancingStrategy, setServerList, setStartAutomatically, setTcpKeepAlive, setTcpNoDelay, setTransportFactory, setValueSizeEstimate, setWriteTimeout
-
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
- See Also:
InitializingBean.afterPropertiesSet()
-
getObject
public SpringRemoteCacheManager getObject() throws Exception
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<SpringRemoteCacheManager>
- Throws:
Exception
- See Also:
FactoryBean.getObject()
-
getObjectType
public Class<? extends SpringRemoteCacheManager> getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<SpringRemoteCacheManager>
- See Also:
FactoryBean.getObjectType()
-
isSingleton
public boolean isSingleton()
Always returntrue
.- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<SpringRemoteCacheManager>
- See Also:
FactoryBean.isSingleton()
-
-