Class 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 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 java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
        See Also:
        InitializingBean.afterPropertiesSet()
      • setBeanName

        public void setBeanName​(java.lang.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 java.lang.Class<? extends java.util.concurrent.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​(java.lang.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