public class InfinispanNamedRemoteCacheFactoryBean<K,V> extends Object implements org.springframework.beans.factory.FactoryBean<RemoteCache<K,V>>, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
A
for creating a
native FactoryBean
named
Infinispan
, delegating to a
org.infinispan.Cache
configurable
. If no cache name is explicitly
set, this oorg.infinispan.client.hotrod.RemoteCacheManagerr
FactoryBean
's
will be
used instead.
beanName
Constructor and Description |
---|
InfinispanNamedRemoteCacheFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
RemoteCache<K,V> |
getObject() |
Class<? extends ConcurrentMap> |
getObjectType() |
boolean |
isSingleton()
Always return true.
|
void |
setBeanName(String name) |
void |
setCacheName(String cacheName)
Sets the
name of the to be created. |
void |
setInfinispanRemoteCacheManager(RemoteCacheManager infinispanRemoteCacheManager)
Sets the
to be used for creating our
instance. |
public InfinispanNamedRemoteCacheFactoryBean()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
InitializingBean.afterPropertiesSet()
public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
BeanNameAware.setBeanName(java.lang.String)
public RemoteCache<K,V> getObject() throws Exception
getObject
in interface org.springframework.beans.factory.FactoryBean<RemoteCache<K,V>>
Exception
FactoryBean.getObject()
public Class<? extends ConcurrentMap> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<RemoteCache<K,V>>
FactoryBean.getObjectType()
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<RemoteCache<K,V>>
FactoryBean.isSingleton()
public void setCacheName(String cacheName)
Sets the name
of the
to be created. If no explicit org.infinispan.Cache
cacheName
is
set, this FactoryBean
will use its
as the beanName
cacheName
.
cacheName
- The name
of the org.infinispan.Cache
to be createdpublic void setInfinispanRemoteCacheManager(RemoteCacheManager infinispanRemoteCacheManager)
Sets the
to be used for creating our
org.infinispan.client.hotrod.RemoteCacheManager
instance. Note that this is a
mandatory property.
Cache
infinispanRemoteCacheManager
- The org.infinispan.client.hotrod.RemoteCacheManager
to be used for
creating our Cache
instanceCopyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.