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 Object implements org.springframework.beans.factory.FactoryBean<RemoteCache<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 Details

    • InfinispanNamedRemoteCacheFactoryBean

      public InfinispanNamedRemoteCacheFactoryBean()
  • Method Details

    • 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(String)
    • getObject

      public RemoteCache<K,V> getObject()
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<K>
      See Also:
      • FactoryBean.getObject()
    • getObjectType

      public Class<? extends ConcurrentMap> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<K>
      See Also:
      • FactoryBean.getObjectType()
    • isSingleton

      public boolean isSingleton()
      Always return true.
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<K>
      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