Class OfferCacheProperties
java.lang.Object
com.broadleafcommerce.promotion.offer.cache.OfferCacheProperties
Properties that influence cache settings for the pricing service
- Author:
- Jeff Fischer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe locale to use for the full offer cache if the locale is not detected in the request context infolongThe number of items to fetch in batch at a time.The locales to cover in the full cache warmup for offerslongThe max number of offer codes to allow into memory when performing full cache load.Restrict full offer code caching based on activity statusAmount of time between full offer cache compilation operations.longThe max number of offers to allow into memory when performing full cache load.Restrict full offer caching based on activity statusAmount of time between full offer code cache compilation operations.Amount of time in the future to include codes that will be active.Amount of time in the future to include offers that will be active.intSize of the LRUMap cache to use to store Pattern instances for Offer Code email regex validation.Amount of time in the past to include codes that were active.Amount of time in the past to include offers that were active.inthashCode()booleanWhether or not full code cache compilation should block the current request.booleanWhether or not full offer code cache compilation should be performed.booleanWhether or not full offer cache compilation should block the current request.booleanWhether or not full offer cache compilation should be performed.booleanWhether or not to detect applications when building full cache during warmup.voidsetCampaignByIds(Duration campaignByIds) voidsetDefaultFullCacheLocale(String defaultFullCacheLocale) The locale to use for the full offer cache if the locale is not detected in the request context infovoidsetFullCacheBatchFetchSize(long fullCacheBatchFetchSize) The number of items to fetch in batch at a time.voidsetFullCacheWarmupLocales(List<String> fullCacheWarmupLocales) The locales to cover in the full cache warmup for offersvoidsetFullCodeCacheBlocking(boolean fullCodeCacheBlocking) Whether or not full code cache compilation should block the current request.voidsetFullCodeCacheEnabled(boolean fullCodeCacheEnabled) Whether or not full offer code cache compilation should be performed.voidsetFullCodeCacheLimit(long fullCodeCacheLimit) The max number of offer codes to allow into memory when performing full cache load.voidsetFullCodeCacheType(FullCacheType fullCodeCacheType) Restrict full offer code caching based on activity statusvoidsetFullOfferByAutomaticThreshold(Duration fullOfferByAutomaticThreshold) Amount of time between full offer cache compilation operations.voidsetFullOfferCacheBlocking(boolean fullOfferCacheBlocking) Whether or not full offer cache compilation should block the current request.voidsetFullOfferCacheEnabled(boolean fullOfferCacheEnabled) Whether or not full offer cache compilation should be performed.voidsetFullOfferCacheLimit(long fullOfferCacheLimit) The max number of offers to allow into memory when performing full cache load.voidsetFullOfferCacheType(FullCacheType fullOfferCacheType) Restrict full offer caching based on activity statusvoidsetFullOfferCodeByCodesThreshold(Duration fullOfferCodeByCodesThreshold) Amount of time between full offer code cache compilation operations.voidsetFutureCodeActiveBufferRange(Duration futureCodeActiveBufferRange) Amount of time in the future to include codes that will be active.voidsetFutureOfferActiveBufferRange(Duration futureOfferActiveBufferRange) Amount of time in the future to include offers that will be active.voidsetMarketingMessageByIds(Duration marketingMessageByIds) voidsetMarketingMessageByOffers(Duration marketingMessageByOffers) voidsetOfferByAutomatic(Duration offerByAutomatic) voidsetOfferByIds(Duration offerByIds) voidsetOfferByTracking(Duration offerByTracking) voidsetOfferByUserTargets(Duration offerByUserTargets) voidsetOfferCodeByCodes(Duration offerCodeByCodes) voidsetOfferCodeEmailRegexPatternCacheSize(int offerCodeEmailRegexPatternCacheSize) Size of the LRUMap cache to use to store Pattern instances for Offer Code email regex validation.voidsetPriorCodeActiveBufferRange(Duration priorCodeActiveBufferRange) Amount of time in the past to include codes that were active.voidsetPriorOfferActiveBufferRange(Duration priorOfferActiveBufferRange) Amount of time in the past to include offers that were active.voidsetWarmUpUsingApplicationDiscrimination(boolean warmUpUsingApplicationDiscrimination) Whether or not to detect applications when building full cache during warmup.toString()
-
Field Details
-
DEFAULT_EMAIL_REGEX_PATTERN_CACHE_SIZE
public static final int DEFAULT_EMAIL_REGEX_PATTERN_CACHE_SIZE- See Also:
-
-
Constructor Details
-
OfferCacheProperties
public OfferCacheProperties()
-
-
Method Details
-
getOfferByAutomatic
-
getCampaignByIds
-
getOfferByIds
-
getOfferByTracking
-
getOfferByUserTargets
-
getOfferCodeByCodes
-
getMarketingMessageByOffers
-
getMarketingMessageByIds
-
isFullCodeCacheEnabled
public boolean isFullCodeCacheEnabled()Whether or not full offer code cache compilation should be performed. SeeLazyCacheController. -
isFullCodeCacheBlocking
public boolean isFullCodeCacheBlocking()Whether or not full code cache compilation should block the current request. Default is false, in which case the cache compilation occurs on a new thread. -
isFullOfferCacheEnabled
public boolean isFullOfferCacheEnabled()Whether or not full offer cache compilation should be performed. SeeLazyCacheController. -
isFullOfferCacheBlocking
public boolean isFullOfferCacheBlocking()Whether or not full offer cache compilation should block the current request. Default is false, in which case the cache compilation occurs on a new thread. -
getFullCodeCacheLimit
public long getFullCodeCacheLimit()The max number of offer codes to allow into memory when performing full cache load. RequiresisFullCodeCacheEnabled()be true. -
getFullOfferCacheLimit
public long getFullOfferCacheLimit()The max number of offers to allow into memory when performing full cache load. RequiresisFullOfferCacheEnabled()be true. -
getFullCacheBatchFetchSize
public long getFullCacheBatchFetchSize()The number of items to fetch in batch at a time. -
getFullCacheWarmupLocales
The locales to cover in the full cache warmup for offers -
getDefaultFullCacheLocale
The locale to use for the full offer cache if the locale is not detected in the request context info -
isWarmUpUsingApplicationDiscrimination
public boolean isWarmUpUsingApplicationDiscrimination()Whether or not to detect applications when building full cache during warmup. If false, tenant alone will be used in constructing cache keys. True by default. -
getFullOfferByAutomaticThreshold
Amount of time between full offer cache compilation operations. Usually smaller thangetOfferByAutomatic(). Only used whenisFullOfferCacheEnabled()is true. -
getFullOfferCodeByCodesThreshold
Amount of time between full offer code cache compilation operations. Usually smaller thangetOfferCodeByCodes(). Only used whenisFullCodeCacheEnabled()is true. -
getFullCodeCacheType
Restrict full offer code caching based on activity status -
getPriorCodeActiveBufferRange
Amount of time in the past to include codes that were active. Applies toFullCacheType.RANGE. -
getFutureCodeActiveBufferRange
Amount of time in the future to include codes that will be active. Applies toFullCacheType.RANGE. -
getFullOfferCacheType
Restrict full offer caching based on activity status -
getPriorOfferActiveBufferRange
Amount of time in the past to include offers that were active. Applies toFullCacheType.RANGE. -
getFutureOfferActiveBufferRange
Amount of time in the future to include offers that will be active. Applies toFullCacheType.RANGE. -
getOfferCodeEmailRegexPatternCacheSize
public int getOfferCodeEmailRegexPatternCacheSize()Size of the LRUMap cache to use to store Pattern instances for Offer Code email regex validation. Default is 500. -
setOfferByAutomatic
-
setCampaignByIds
-
setOfferByIds
-
setOfferByTracking
-
setOfferByUserTargets
-
setOfferCodeByCodes
-
setMarketingMessageByOffers
-
setMarketingMessageByIds
-
setFullCodeCacheEnabled
public void setFullCodeCacheEnabled(boolean fullCodeCacheEnabled) Whether or not full offer code cache compilation should be performed. SeeLazyCacheController. -
setFullCodeCacheBlocking
public void setFullCodeCacheBlocking(boolean fullCodeCacheBlocking) Whether or not full code cache compilation should block the current request. Default is false, in which case the cache compilation occurs on a new thread. -
setFullOfferCacheEnabled
public void setFullOfferCacheEnabled(boolean fullOfferCacheEnabled) Whether or not full offer cache compilation should be performed. SeeLazyCacheController. -
setFullOfferCacheBlocking
public void setFullOfferCacheBlocking(boolean fullOfferCacheBlocking) Whether or not full offer cache compilation should block the current request. Default is false, in which case the cache compilation occurs on a new thread. -
setFullCodeCacheLimit
public void setFullCodeCacheLimit(long fullCodeCacheLimit) The max number of offer codes to allow into memory when performing full cache load. RequiresisFullCodeCacheEnabled()be true. -
setFullOfferCacheLimit
public void setFullOfferCacheLimit(long fullOfferCacheLimit) The max number of offers to allow into memory when performing full cache load. RequiresisFullOfferCacheEnabled()be true. -
setFullCacheBatchFetchSize
public void setFullCacheBatchFetchSize(long fullCacheBatchFetchSize) The number of items to fetch in batch at a time. -
setFullCacheWarmupLocales
The locales to cover in the full cache warmup for offers -
setDefaultFullCacheLocale
The locale to use for the full offer cache if the locale is not detected in the request context info -
setWarmUpUsingApplicationDiscrimination
public void setWarmUpUsingApplicationDiscrimination(boolean warmUpUsingApplicationDiscrimination) Whether or not to detect applications when building full cache during warmup. If false, tenant alone will be used in constructing cache keys. True by default. -
setFullOfferByAutomaticThreshold
Amount of time between full offer cache compilation operations. Usually smaller thangetOfferByAutomatic(). Only used whenisFullOfferCacheEnabled()is true. -
setFullOfferCodeByCodesThreshold
Amount of time between full offer code cache compilation operations. Usually smaller thangetOfferCodeByCodes(). Only used whenisFullCodeCacheEnabled()is true. -
setFullCodeCacheType
Restrict full offer code caching based on activity status -
setPriorCodeActiveBufferRange
Amount of time in the past to include codes that were active. Applies toFullCacheType.RANGE. -
setFutureCodeActiveBufferRange
Amount of time in the future to include codes that will be active. Applies toFullCacheType.RANGE. -
setFullOfferCacheType
Restrict full offer caching based on activity status -
setPriorOfferActiveBufferRange
Amount of time in the past to include offers that were active. Applies toFullCacheType.RANGE. -
setFutureOfferActiveBufferRange
Amount of time in the future to include offers that will be active. Applies toFullCacheType.RANGE. -
setOfferCodeEmailRegexPatternCacheSize
public void setOfferCodeEmailRegexPatternCacheSize(int offerCodeEmailRegexPatternCacheSize) Size of the LRUMap cache to use to store Pattern instances for Offer Code email regex validation. Default is 500. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-