Class JCacheRegionConfiguration

java.lang.Object
org.broadleafcommerce.common.extensibility.cache.JCacheRegionConfiguration

public class JCacheRegionConfiguration extends Object
DTO object to represent the configuration of a cache region

If configuration is set then it will be used to create the region otherwise the other properties will be used. If this class is subclassed then JCacheConfigurationBuilder will likely also need to be overridden in order to utilize any new properties.

By default instances of this class are defined in Broadleaf to set the default configuration for known cache regions. If you would like to override cache regions using this DTO when targeting ehcache then set the property jcache.create.cache.forceJavaConfig to true. When targeting any other jcache implementation simply create an instance of this DTO for each new region or region override as a bean.

Author:
Jay Aisenbrey (cja769)
  • Field Details

    • cacheName

      protected String cacheName
    • ttlSeconds

      protected int ttlSeconds
    • maxElementsInMemory

      protected int maxElementsInMemory
    • key

      protected Class<?> key
    • value

      protected Class<?> value
    • enableManagement

      protected Boolean enableManagement
    • enableStatistics

      protected Boolean enableStatistics
    • configuration

      protected javax.cache.configuration.Configuration<?,?> configuration
  • Constructor Details

    • JCacheRegionConfiguration

      public JCacheRegionConfiguration(String cacheName, int ttlSeconds, int maxElementsInMemory, Class<?> key, Class<?> value, Boolean enableManagement, Boolean enableStatistics)
    • JCacheRegionConfiguration

      public JCacheRegionConfiguration(String cacheName, int ttlSeconds, int maxElementsInMemory, Class<?> key, Class<?> value)
    • JCacheRegionConfiguration

      public JCacheRegionConfiguration(String cacheName, int ttlSeconds, int maxElementsInMemory)
    • JCacheRegionConfiguration

      public JCacheRegionConfiguration(String cacheName)
    • JCacheRegionConfiguration

      public JCacheRegionConfiguration(String cacheName, javax.cache.configuration.Configuration<?,?> configuration)
  • Method Details

    • getCacheName

      public String getCacheName()
    • setCacheName

      public void setCacheName(String cacheName)
    • getTtlSeconds

      public int getTtlSeconds()
    • setTtlSeconds

      public void setTtlSeconds(int ttlSeconds)
    • getMaxElementsInMemory

      public int getMaxElementsInMemory()
    • setMaxElementsInMemory

      public void setMaxElementsInMemory(int maxElementsInMemory)
    • getKey

      public Class<?> getKey()
    • setKey

      public void setKey(Class<?> key)
    • getValue

      public Class<?> getValue()
    • setValue

      public void setValue(Class<?> value)
    • getEnableManagement

      public Boolean getEnableManagement()
    • setEnableManagement

      public void setEnableManagement(Boolean enableManagement)
    • getEnableStatistics

      public Boolean getEnableStatistics()
    • setEnableStatistics

      public void setEnableStatistics(Boolean enableStatistics)
    • getConfiguration

      public javax.cache.configuration.Configuration<?,?> getConfiguration()
    • setConfiguration

      public void setConfiguration(javax.cache.configuration.Configuration<?,?> configuration)