org.infinispan.spring.support.remote
Class InfinispanNamedRemoteCacheFactoryBean<K,V>

java.lang.Object
  extended by 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<BasicCache<K,V>>, org.springframework.beans.factory.InitializingBean

public class InfinispanNamedRemoteCacheFactoryBean<K,V>
extends Object
implements org.springframework.beans.factory.FactoryBean<BasicCache<K,V>>, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

A FactoryBean for creating a native named Infinispan org.infinispan.Cache, delegating to a configurable oorg.infinispan.client.hotrod.RemoteCacheManagerr. If no cache name is explicitly set, this FactoryBean's beanName will be used instead.

Author:
Olaf Bergner

Constructor Summary
InfinispanNamedRemoteCacheFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 BasicCache<K,V> getObject()
           
 Class<? extends BasicCache> getObjectType()
           
 boolean isSingleton()
          Always return true.
 void setBeanName(String name)
           
 void setCacheName(String cacheName)
           Sets the name of the org.infinispan.Cache to be created.
 void setInfinispanRemoteCacheManager(RemoteCacheManager infinispanRemoteCacheManager)
           Sets the org.infinispan.client.hotrod.RemoteCacheManager to be used for creating our Cache instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfinispanNamedRemoteCacheFactoryBean

public InfinispanNamedRemoteCacheFactoryBean()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception
See Also:
InitializingBean.afterPropertiesSet()

setBeanName

public void setBeanName(String name)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware
See Also:
BeanNameAware.setBeanName(java.lang.String)

getObject

public BasicCache<K,V> getObject()
                          throws Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<BasicCache<K,V>>
Throws:
Exception
See Also:
FactoryBean.getObject()

getObjectType

public Class<? extends BasicCache> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<BasicCache<K,V>>
See Also:
FactoryBean.getObjectType()

isSingleton

public boolean isSingleton()
Always return true.

Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<BasicCache<K,V>>
See Also:
FactoryBean.isSingleton()

setCacheName

public void setCacheName(String cacheName)

Sets the name of the org.infinispan.Cache to be created. If no explicit cacheName is set, this FactoryBean will use its beanName as the cacheName.

Parameters:
cacheName - The name of the org.infinispan.Cache to be created

setInfinispanRemoteCacheManager

public void setInfinispanRemoteCacheManager(RemoteCacheManager infinispanRemoteCacheManager)

Sets the org.infinispan.client.hotrod.RemoteCacheManager to be used for creating our Cache instance. Note that this is a mandatory property.

Parameters:
infinispanRemoteCacheManager - The org.infinispan.client.hotrod.RemoteCacheManager to be used for creating our Cache instance

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.