Class InfinispanNamedRemoteCacheFactoryBean<K,V>
- java.lang.Object
-
- org.infinispan.spring.support.remote.InfinispanNamedRemoteCacheFactoryBean<K,V>
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.FactoryBean<RemoteCache<K,V>>,org.springframework.beans.factory.InitializingBean
public class InfinispanNamedRemoteCacheFactoryBean<K,V> extends java.lang.Object implements org.springframework.beans.factory.FactoryBean<RemoteCache<K,V>>, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
A
for creating a nativeFactoryBeannamedInfinispan, delegating to aorg.infinispan.Cacheconfigurable. If no cache name is explicitly set, thisoorg.infinispan.client.hotrod.RemoteCacheManagerrFactoryBean'swill be used instead.beanName- Author:
- Olaf Bergner
-
-
Constructor Summary
Constructors Constructor Description InfinispanNamedRemoteCacheFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()RemoteCache<K,V>getObject()java.lang.Class<? extends java.util.concurrent.ConcurrentMap>getObjectType()booleanisSingleton()Always return true.voidsetBeanName(java.lang.String name)voidsetCacheName(java.lang.String cacheName)Sets thenameof theto be created.org.infinispan.CachevoidsetInfinispanRemoteCacheManager(RemoteCacheManager infinispanRemoteCacheManager)Sets theto be used for creating ourorg.infinispan.client.hotrod.RemoteCacheManagerinstance.Cache
-
-
-
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()
-
setBeanName
public void setBeanName(java.lang.String name)
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware- See Also:
BeanNameAware.setBeanName(java.lang.String)
-
getObject
public RemoteCache<K,V> getObject() throws java.lang.Exception
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<K>- Throws:
java.lang.Exception- See Also:
FactoryBean.getObject()
-
getObjectType
public java.lang.Class<? extends java.util.concurrent.ConcurrentMap> getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<K>- See Also:
FactoryBean.getObjectType()
-
isSingleton
public boolean isSingleton()
Always return true.- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<K>- See Also:
FactoryBean.isSingleton()
-
setCacheName
public void setCacheName(java.lang.String cacheName)
Sets the
nameof theto be created. If no explicitorg.infinispan.CachecacheNameis set, thisFactoryBeanwill use itsas thebeanNamecacheName.- Parameters:
cacheName- Thenameof theto be createdorg.infinispan.Cache
-
setInfinispanRemoteCacheManager
public void setInfinispanRemoteCacheManager(RemoteCacheManager infinispanRemoteCacheManager)
Sets the
to be used for creating ourorg.infinispan.client.hotrod.RemoteCacheManagerinstance. Note that this is a mandatory property.Cache- Parameters:
infinispanRemoteCacheManager- Theto be used for creating ourorg.infinispan.client.hotrod.RemoteCacheManagerinstanceCache
-
-