Class 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 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 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 org.infinispan.client.hotrod.RemoteCache<K,​V> getObject()
                                                                      throws Exception
        Specified by:
        getObject in interface org.springframework.beans.factory.FactoryBean<K>
        Throws:
        Exception
        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()
      • setInfinispanRemoteCacheManager

        public void setInfinispanRemoteCacheManager​(org.infinispan.client.hotrod.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