Class InfinispanRemoteCacheManagerFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<RemoteCacheManager>,org.springframework.beans.factory.InitializingBean
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
PropertiesRemoteCacheManager'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.
- Author:
- Olaf Bergner
- See Also:
-
Field Summary
Fields inherited from class org.infinispan.spring.remote.AbstractRemoteCacheManagerFactory
logger, SPRING_JAVA_SERIAL_ALLOWLIST, startAutomaticallyFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()thestopRemoteCacheManagercreated by this factory.Class<? extends RemoteCacheManager> booleanAlways returntrue.Methods inherited from class org.infinispan.spring.remote.AbstractRemoteCacheManagerFactory
assertCorrectlyConfigured, configurationProperties, setAsyncExecutorFactory, setClassAllowList, setClassWhiteList, setConfigurationProperties, setConfigurationPropertiesFileLocation, setForceReturnValues, setKeySizeEstimate, setMarshaller, setNearCacheMaxEntries, setNearCacheMode, setNearCacheNamePattern, setReadTimeout, setRequestBalancingStrategy, setServerList, setStartAutomatically, setTcpKeepAlive, setTcpNoDelay, setTransportFactory, setValueSizeEstimate, setWriteTimeout
-
Constructor Details
-
InfinispanRemoteCacheManagerFactoryBean
public InfinispanRemoteCacheManagerFactoryBean()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception- See Also:
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<RemoteCacheManager>- Throws:
Exception- See Also:
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<RemoteCacheManager>- See Also:
-
isSingleton
public boolean isSingleton()Always returntrue.- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<RemoteCacheManager>- See Also:
-
destroy
thestopRemoteCacheManagercreated by this factory.- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception- See Also:
-