Class JCacheRegionConfiguration
java.lang.Object
org.broadleafcommerce.common.extensibility.cache.JCacheRegionConfiguration
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJCacheRegionConfiguration
(String cacheName) JCacheRegionConfiguration
(String cacheName, int ttlSeconds, int maxElementsInMemory) JCacheRegionConfiguration
(String cacheName, int ttlSeconds, int maxElementsInMemory, Class<?> key, Class<?> value) JCacheRegionConfiguration
(String cacheName, int ttlSeconds, int maxElementsInMemory, Class<?> key, Class<?> value, Boolean enableManagement, Boolean enableStatistics) JCacheRegionConfiguration
(String cacheName, javax.cache.configuration.Configuration<?, ?> configuration) -
Method Summary
Modifier and TypeMethodDescriptionjavax.cache.configuration.Configuration<?,
?> Class<?>
getKey()
int
int
Class<?>
getValue()
void
setCacheName
(String cacheName) void
setConfiguration
(javax.cache.configuration.Configuration<?, ?> configuration) void
setEnableManagement
(Boolean enableManagement) void
setEnableStatistics
(Boolean enableStatistics) void
void
setMaxElementsInMemory
(int maxElementsInMemory) void
setTtlSeconds
(int ttlSeconds) void
-
Field Details
-
cacheName
-
ttlSeconds
protected int ttlSeconds -
maxElementsInMemory
protected int maxElementsInMemory -
key
-
value
-
enableManagement
-
enableStatistics
-
configuration
protected javax.cache.configuration.Configuration<?,?> configuration
-
-
Constructor Details
-
JCacheRegionConfiguration
-
JCacheRegionConfiguration
-
JCacheRegionConfiguration
-
JCacheRegionConfiguration
-
JCacheRegionConfiguration
public JCacheRegionConfiguration(String cacheName, javax.cache.configuration.Configuration<?, ?> configuration)
-
-
Method Details
-
getCacheName
-
setCacheName
-
getTtlSeconds
public int getTtlSeconds() -
setTtlSeconds
public void setTtlSeconds(int ttlSeconds) -
getMaxElementsInMemory
public int getMaxElementsInMemory() -
setMaxElementsInMemory
public void setMaxElementsInMemory(int maxElementsInMemory) -
getKey
-
setKey
-
getValue
-
setValue
-
getEnableManagement
-
setEnableManagement
-
getEnableStatistics
-
setEnableStatistics
-
getConfiguration
public javax.cache.configuration.Configuration<?,?> getConfiguration() -
setConfiguration
public void setConfiguration(javax.cache.configuration.Configuration<?, ?> configuration)
-