Class MergeJCacheManagerFactoryBean

java.lang.Object
org.broadleafcommerce.common.extensibility.cache.jcache.MergeJCacheManagerFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>, org.springframework.beans.factory.InitializingBean

public class MergeJCacheManagerFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Generic Spring Bean Factory to merge various XML files together and pass them to the JCache CachingProvider to create a CacheManager.

The defaults assume you are using EhCache, but this could be used for other JCache implementations.

Author:
Kelly Tisdell
  • Field Details

    • disableCache

      @Value("${jcache.disable.cache:false}") protected boolean disableCache
    • uriProvider

      @Autowired protected JCacheUriProvider uriProvider
    • configBuilder

      @Autowired protected JCacheConfigurationBuilder configBuilder
    • cacheConfiguration

      @Autowired(required=false) protected List<JCacheRegionConfiguration> cacheConfiguration
    • createIfMissing

      @Value("${jcache.create.cache.ifMissing:true}") protected boolean createIfMissing
    • overrideWithJavaConfig

      @Value("${jcache.create.cache.forceJavaConfig:false}") protected boolean overrideWithJavaConfig
  • Constructor Details

    • MergeJCacheManagerFactoryBean

      public MergeJCacheManagerFactoryBean()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • getObject

      @Nullable public javax.cache.CacheManager getObject()
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader classLoader)
      Specified by:
      setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
    • setCacheManagerProperties

      public void setCacheManagerProperties(@Nullable Properties cacheManagerProperties)
    • getDefaultClassLoaderForProvider

      protected ClassLoader getDefaultClassLoaderForProvider()
    • createCacheIfNotExists

      protected void createCacheIfNotExists(JCacheRegionConfiguration config)