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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The locale to use for the full offer cache if the locale is not detected in the request context infolong
The number of items to fetch in batch at a time.The locales to cover in the full cache warmup for offerslong
The 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.long
The 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.int
Size 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.int
hashCode()
boolean
Whether or not full code cache compilation should block the current request.boolean
Whether or not full offer code cache compilation should be performed.boolean
Whether or not full offer cache compilation should block the current request.boolean
Whether or not full offer cache compilation should be performed.boolean
Whether or not to detect applications when building full cache during warmup.void
setCampaignByIds
(Duration campaignByIds) void
setDefaultFullCacheLocale
(String defaultFullCacheLocale) The locale to use for the full offer cache if the locale is not detected in the request context infovoid
setFullCacheBatchFetchSize
(long fullCacheBatchFetchSize) The number of items to fetch in batch at a time.void
setFullCacheWarmupLocales
(List<String> fullCacheWarmupLocales) The locales to cover in the full cache warmup for offersvoid
setFullCodeCacheBlocking
(boolean fullCodeCacheBlocking) Whether or not full code cache compilation should block the current request.void
setFullCodeCacheEnabled
(boolean fullCodeCacheEnabled) Whether or not full offer code cache compilation should be performed.void
setFullCodeCacheLimit
(long fullCodeCacheLimit) The max number of offer codes to allow into memory when performing full cache load.void
setFullCodeCacheType
(FullCacheType fullCodeCacheType) Restrict full offer code caching based on activity statusvoid
setFullOfferByAutomaticThreshold
(Duration fullOfferByAutomaticThreshold) Amount of time between full offer cache compilation operations.void
setFullOfferCacheBlocking
(boolean fullOfferCacheBlocking) Whether or not full offer cache compilation should block the current request.void
setFullOfferCacheEnabled
(boolean fullOfferCacheEnabled) Whether or not full offer cache compilation should be performed.void
setFullOfferCacheLimit
(long fullOfferCacheLimit) The max number of offers to allow into memory when performing full cache load.void
setFullOfferCacheType
(FullCacheType fullOfferCacheType) Restrict full offer caching based on activity statusvoid
setFullOfferCodeByCodesThreshold
(Duration fullOfferCodeByCodesThreshold) Amount of time between full offer code cache compilation operations.void
setFutureCodeActiveBufferRange
(Duration futureCodeActiveBufferRange) Amount of time in the future to include codes that will be active.void
setFutureOfferActiveBufferRange
(Duration futureOfferActiveBufferRange) Amount of time in the future to include offers that will be active.void
setMarketingMessageByIds
(Duration marketingMessageByIds) void
setMarketingMessageByOffers
(Duration marketingMessageByOffers) void
setOfferByAutomatic
(Duration offerByAutomatic) void
setOfferByIds
(Duration offerByIds) void
setOfferByTracking
(Duration offerByTracking) void
setOfferByUserTargets
(Duration offerByUserTargets) void
setOfferCodeByCodes
(Duration offerCodeByCodes) void
setOfferCodeEmailRegexPatternCacheSize
(int offerCodeEmailRegexPatternCacheSize) Size of the LRUMap cache to use to store Pattern instances for Offer Code email regex validation.void
setPriorCodeActiveBufferRange
(Duration priorCodeActiveBufferRange) Amount of time in the past to include codes that were active.void
setPriorOfferActiveBufferRange
(Duration priorOfferActiveBufferRange) Amount of time in the past to include offers that were active.void
setWarmUpUsingApplicationDiscrimination
(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
-