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
Configurationfor creating anFactoryBeaninstance.Infinispan RemoteCacheManager
A
RemoteCacheManageris configured through aobject. For an exhaustive list of valid properties to be used seePropertiesRemoteCacheManager'sjavadocs. ThisFactoryBeanprovides means to eitherinjecta user-definedPropertiesinstance or tosetthe 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
settingthe location of aPropertiesfile to load the configuration from, thisFactoryBeanprovides (typed) setters for all configuration settings. Settings thus defined take precedence over those defined in the injectedPropertiesinstance. This flexibility enables users to use e.g. a company-widePropertiesfile containing default settings while simultaneously overriding select settings whenever special requirements warrant this.
Note that it is illegal to use setters in conjunction withinjectingaPropertiesinstance.In addition to creating a
RemoteCacheManagerthisFactoryBeandoes also control thatRemoteCacheManagers's lifecycle by shutting it down when the enclosing Spring application context is closed. It is therefore advisable to always use thisFactoryBeanwhen creating aRemoteCacheManager.- Author:
- Olaf Bergner
- See Also:
RemoteCacheManager,destroy()
-
-
Field Summary
-
Fields inherited from class org.infinispan.spring.remote.AbstractRemoteCacheManagerFactory
logger, startAutomatically
-
-
Constructor Summary
Constructors Constructor Description InfinispanRemoteCacheManagerFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voiddestroy()thestopRemoteCacheManagercreated by this factory.RemoteCacheManagergetObject()java.lang.Class<? extends RemoteCacheManager>getObjectType()booleanisSingleton()Always returntrue.-
Methods inherited from class org.infinispan.spring.remote.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 java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception- See Also:
InitializingBean.afterPropertiesSet()
-
getObject
public RemoteCacheManager getObject() throws java.lang.Exception
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<RemoteCacheManager>- Throws:
java.lang.Exception- See Also:
FactoryBean.getObject()
-
getObjectType
public java.lang.Class<? extends RemoteCacheManager> getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<RemoteCacheManager>- See Also:
FactoryBean.getObjectType()
-
isSingleton
public boolean isSingleton()
Always returntrue.- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<RemoteCacheManager>- See Also:
FactoryBean.isSingleton()
-
destroy
public void destroy() throws java.lang.ExceptionthestopRemoteCacheManagercreated by this factory.- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
java.lang.Exception- See Also:
DisposableBean.destroy()
-
-