Class DefaultJCacheConfigurationBuilder
java.lang.Object
org.broadleafcommerce.common.extensibility.cache.DefaultJCacheConfigurationBuilder
- All Implemented Interfaces:
JCacheConfigurationBuilder
- Direct Known Subclasses:
DefaultEhCacheConfigurationBuilder
@Service("blJCacheConfigurationBuilder")
@ConditionalOnEhCacheMissing
public class DefaultJCacheConfigurationBuilder
extends Object
implements JCacheConfigurationBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K,V> javax.cache.configuration.Configuration<K, V> buildConfiguration(int ttlSeconds, int maxElementsInMemory, Class<K> keyClass, Class<V> valueClass) Similar toJCacheConfigurationBuilder.buildConfiguration(JCacheRegionConfiguration)however it requires more specifc arguments.javax.cache.configuration.ConfigurationbuildConfiguration(JCacheRegionConfiguration regionInformation) Given aJCacheRegionConfigurationbuild the appropriateConfigurationclass
-
Constructor Details
-
DefaultJCacheConfigurationBuilder
public DefaultJCacheConfigurationBuilder()
-
-
Method Details
-
buildConfiguration
public javax.cache.configuration.Configuration buildConfiguration(JCacheRegionConfiguration regionInformation) Description copied from interface:JCacheConfigurationBuilderGiven aJCacheRegionConfigurationbuild the appropriateConfigurationclassThe purpose of this method is to allow for extensibility and customization when using specific JCache implementations since most support more configuration than the JSR-107 spec allows
- Specified by:
buildConfigurationin interfaceJCacheConfigurationBuilder- Parameters:
regionInformation- TheJCacheRegionConfigurationto use to build theConfiguration- Returns:
- The
Configuration
-
buildConfiguration
public <K,V> javax.cache.configuration.Configuration<K,V> buildConfiguration(int ttlSeconds, int maxElementsInMemory, Class<K> keyClass, Class<V> valueClass) Description copied from interface:JCacheConfigurationBuilderSimilar toJCacheConfigurationBuilder.buildConfiguration(JCacheRegionConfiguration)however it requires more specifc arguments.The purpose of this method was for internal Broadleaf usages where we're sending the exact arguments
- Specified by:
buildConfigurationin interfaceJCacheConfigurationBuilder- Type Parameters:
K- The key class of theConfigurationV- The value class of theConfiguration- Parameters:
ttlSeconds- The time to live for cache items in secondsmaxElementsInMemory- The maximum number of elments allowed in the cache. Note that in some JCache implementations this is not usedkeyClass- The key class of theConfigurationvalueClass- The value class of theConfiguration- Returns:
-