Class InfinispanNamedRemoteCacheFactoryBean<K,V>
- java.lang.Object
-
- org.infinispan.spring.remote.support.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 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()
RemoteCache<K,V>
getObject()
java.lang.Class<? extends java.util.concurrent.ConcurrentMap>
getObjectType()
boolean
isSingleton()
Always return true.void
setBeanName(java.lang.String name)
void
setCacheName(java.lang.String cacheName)
Sets thename
of the
to be created.org.infinispan.Cache
void
setInfinispanRemoteCacheManager(RemoteCacheManager infinispanRemoteCacheManager)
Sets the
to be used for creating ourorg.infinispan.client.hotrod.RemoteCacheManager
instance.Cache
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
- See Also:
InitializingBean.afterPropertiesSet()
-
setBeanName
public void setBeanName(java.lang.String name)
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
- See Also:
BeanNameAware.setBeanName(String)
-
getObject
public RemoteCache<K,V> getObject()
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<K>
- See Also:
FactoryBean.getObject()
-
getObjectType
public java.lang.Class<? extends java.util.concurrent.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(java.lang.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(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
-
-