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<org.infinispan.client.hotrod.RemoteCache<K,V>>
,org.springframework.beans.factory.InitializingBean
public class InfinispanNamedRemoteCacheFactoryBean<K,V> extends Object implements org.springframework.beans.factory.FactoryBean<org.infinispan.client.hotrod.RemoteCache<K,V>>, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
A
for creating a nativeFactoryBean
named
Infinispan
, delegating to aorg.infinispan.Cache
configurable
. If no cache name is explicitly set, thisoorg.infinispan.client.hotrod.RemoteCacheManagerr
FactoryBean
's
will 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 void
afterPropertiesSet()
org.infinispan.client.hotrod.RemoteCache<K,V>
getObject()
Class<? extends ConcurrentMap>
getObjectType()
boolean
isSingleton()
Always return true.void
setBeanName(String name)
void
setCacheName(String cacheName)
Sets thename
of the
to be created.org.infinispan.Cache
void
setInfinispanRemoteCacheManager(org.infinispan.client.hotrod.RemoteCacheManager infinispanRemoteCacheManager)
Sets the
to be used for creating ourorg.infinispan.client.hotrod.RemoteCacheManager
instance.Cache
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
- See Also:
InitializingBean.afterPropertiesSet()
-
setBeanName
public void setBeanName(String name)
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
- See Also:
BeanNameAware.setBeanName(java.lang.String)
-
getObjectType
public Class<? extends ConcurrentMap> getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<K>
- See Also:
FactoryBean.getObjectType()
-
isSingleton
public boolean isSingleton()
Always return true.- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<K>
- See Also:
FactoryBean.isSingleton()
-
setCacheName
public void setCacheName(String cacheName)
Sets the
name
of the
to be created. If no explicitorg.infinispan.Cache
cacheName
is set, thisFactoryBean
will use its
as thebeanName
cacheName
.- Parameters:
cacheName
- Thename
of the
to be createdorg.infinispan.Cache
-
setInfinispanRemoteCacheManager
public void setInfinispanRemoteCacheManager(org.infinispan.client.hotrod.RemoteCacheManager infinispanRemoteCacheManager)
Sets the
to be used for creating ourorg.infinispan.client.hotrod.RemoteCacheManager
instance. Note that this is a mandatory property.Cache
- Parameters:
infinispanRemoteCacheManager
- The
to be used for creating ourorg.infinispan.client.hotrod.RemoteCacheManager
instanceCache
-
-