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
Configurationfor creating anFactoryBeaninstance.SpringRemoteCacheManager
A
SpringRemoteCacheManageris 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
SpringRemoteCacheManagerthisFactoryBeandoes also control thatSpringRemoteCacheManager's lifecycle by shutting it down when the enclosing Spring application context is closed. It is therefore advisable to always use thisFactoryBeanwhen 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 voidafterPropertiesSet()voiddestroy()thestopRemoteCacheManagercreated by this factory.SpringRemoteCacheManagergetObject()Class<? extends SpringRemoteCacheManager>getObjectType()booleanisSingleton()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:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception- See Also:
InitializingBean.afterPropertiesSet()
-
getObject
public SpringRemoteCacheManager getObject() throws Exception
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<SpringRemoteCacheManager>- Throws:
Exception- See Also:
FactoryBean.getObject()
-
getObjectType
public Class<? extends SpringRemoteCacheManager> getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<SpringRemoteCacheManager>- See Also:
FactoryBean.getObjectType()
-
isSingleton
public boolean isSingleton()
Always returntrue.- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<SpringRemoteCacheManager>- See Also:
FactoryBean.isSingleton()
-
-