Class InfinispanRemoteCacheManagerFactoryBean
- java.lang.Object
-
- org.infinispan.spring.remote.AbstractRemoteCacheManagerFactory
-
- org.infinispan.spring.remote.support.InfinispanRemoteCacheManagerFactoryBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<RemoteCacheManager>
,org.springframework.beans.factory.InitializingBean
public class InfinispanRemoteCacheManagerFactoryBean extends AbstractRemoteCacheManagerFactory implements org.springframework.beans.factory.FactoryBean<RemoteCacheManager>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
A
Configuration
for creating anFactoryBean
instance.Infinispan RemoteCacheManager
A
RemoteCacheManager
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
RemoteCacheManager
thisFactoryBean
does also control thatRemoteCacheManagers
's lifecycle by shutting it down when the enclosing Spring application context is closed. It is therefore advisable to always use thisFactoryBean
when creating aRemoteCacheManager
.- Author:
- Olaf Bergner
- See Also:
RemoteCacheManager
,destroy()
-
-
Field Summary
-
Fields inherited from class org.infinispan.spring.remote.AbstractRemoteCacheManagerFactory
logger, SPRING_JAVA_SERIAL_WHITELIST, startAutomatically
-
-
Constructor Summary
Constructors Constructor Description InfinispanRemoteCacheManagerFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
destroy()
thestop
RemoteCacheManager
created by this factory.RemoteCacheManager
getObject()
java.lang.Class<? extends RemoteCacheManager>
getObjectType()
boolean
isSingleton()
Always returntrue
.-
Methods inherited from class org.infinispan.spring.remote.AbstractRemoteCacheManagerFactory
assertCorrectlyConfigured, configurationProperties, setAsyncExecutorFactory, setClassWhiteList, setConfigurationProperties, setConfigurationPropertiesFileLocation, setForceReturnValues, setKeySizeEstimate, setMarshaller, setNearCacheMaxEntries, setNearCacheMode, setNearCacheNamePattern, setReadTimeout, setRequestBalancingStrategy, setServerList, setStartAutomatically, setTcpKeepAlive, setTcpNoDelay, setTransportFactory, setValueSizeEstimate, setWriteTimeout
-
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
- See Also:
InitializingBean.afterPropertiesSet()
-
getObject
public RemoteCacheManager getObject() throws java.lang.Exception
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<RemoteCacheManager>
- Throws:
java.lang.Exception
- See Also:
FactoryBean.getObject()
-
getObjectType
public java.lang.Class<? extends RemoteCacheManager> getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<RemoteCacheManager>
- See Also:
FactoryBean.getObjectType()
-
isSingleton
public boolean isSingleton()
Always returntrue
.- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<RemoteCacheManager>
- See Also:
FactoryBean.isSingleton()
-
destroy
public void destroy() throws java.lang.Exception
thestop
RemoteCacheManager
created by this factory.- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
java.lang.Exception
- See Also:
DisposableBean.destroy()
-
-