Class EhcacheProperties
java.lang.Object
com.broadleafcommerce.common.extension.cache.ehcache.EhcacheProperties
@ConfigurationProperties(prefix="broadleaf.cache.ehcache")
public class EhcacheProperties
extends Object
Configuration properties for Ehcache off-heap tier and Kryo serialization.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanorg.springframework.util.unit.DataSizegetHeap()The maximum size of the on-heap tier in megabytes for all caches running in this JVM.org.springframework.util.unit.DataSizeThe maximum size of the off-heap tier in megabytes for all caches running in this JVM.inthashCode()booleanToggles the tracking of high-level throughput metrics (hits, misses, gets, puts) via JSR-107enableStatistics.booleanA global "kill switch" for the Micrometer integration.voidsetCacheStatisticsEnabled(boolean cacheStatisticsEnabled) Toggles the tracking of high-level throughput metrics (hits, misses, gets, puts) via JSR-107enableStatistics.voidsetHeap(org.springframework.util.unit.DataSize heap) The maximum size of the on-heap tier in megabytes for all caches running in this JVM.voidsetMetricsCollectionEnabled(boolean metricsCollectionEnabled) A global "kill switch" for the Micrometer integration.voidsetOffheap(org.springframework.util.unit.DataSize offheap) The maximum size of the off-heap tier in megabytes for all caches running in this JVM.toString()
-
Constructor Details
-
EhcacheProperties
public EhcacheProperties()
-
-
Method Details
-
getHeap
public org.springframework.util.unit.DataSize getHeap()The maximum size of the on-heap tier in megabytes for all caches running in this JVM.- Since:
- 2.0.7
-
getOffheap
public org.springframework.util.unit.DataSize getOffheap()The maximum size of the off-heap tier in megabytes for all caches running in this JVM.- Since:
- 2.0.7
-
isMetricsCollectionEnabled
public boolean isMetricsCollectionEnabled()A global "kill switch" for the Micrometer integration. When enabled, basic metadata such as cache size will be exported to the Micrometer registry. This provides visibility into the cache's footprint with negligible overhead. True by default.- Since:
- 2.0.7
-
isCacheStatisticsEnabled
public boolean isCacheStatisticsEnabled()Toggles the tracking of high-level throughput metrics (hits, misses, gets, puts) via JSR-107enableStatistics. Tracking these metrics requires the provider to wrap operations in counters, which can introduce overhead in high-concurrency environments. This setting only takes effect ifisMetricsCollectionEnabled()is true. True by default.- Since:
- 2.0.7
-
setHeap
public void setHeap(org.springframework.util.unit.DataSize heap) The maximum size of the on-heap tier in megabytes for all caches running in this JVM.- Since:
- 2.0.7
-
setOffheap
public void setOffheap(org.springframework.util.unit.DataSize offheap) The maximum size of the off-heap tier in megabytes for all caches running in this JVM.- Since:
- 2.0.7
-
setMetricsCollectionEnabled
public void setMetricsCollectionEnabled(boolean metricsCollectionEnabled) A global "kill switch" for the Micrometer integration. When enabled, basic metadata such as cache size will be exported to the Micrometer registry. This provides visibility into the cache's footprint with negligible overhead. True by default.- Since:
- 2.0.7
-
setCacheStatisticsEnabled
public void setCacheStatisticsEnabled(boolean cacheStatisticsEnabled) Toggles the tracking of high-level throughput metrics (hits, misses, gets, puts) via JSR-107enableStatistics. Tracking these metrics requires the provider to wrap operations in counters, which can introduce overhead in high-concurrency environments. This setting only takes effect ifisMetricsCollectionEnabled()is true. True by default.- Since:
- 2.0.7
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-