Class OfferCacheProperties

java.lang.Object
com.broadleafcommerce.promotion.offer.cache.OfferCacheProperties

@ConfigurationProperties("broadleaf.offer.cache") public class OfferCacheProperties extends Object
Properties that influence cache settings for the pricing service
Author:
Jeff Fischer
  • 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

      public Duration getOfferByAutomatic()
    • getCampaignByIds

      public Duration getCampaignByIds()
    • getOfferByIds

      public Duration getOfferByIds()
    • getOfferByTracking

      public Duration getOfferByTracking()
    • getOfferByUserTargets

      public Duration getOfferByUserTargets()
    • getOfferCodeByCodes

      public Duration getOfferCodeByCodes()
    • getMarketingMessageByOffers

      public Duration getMarketingMessageByOffers()
    • getMarketingMessageByIds

      public Duration getMarketingMessageByIds()
    • isFullCodeCacheEnabled

      public boolean isFullCodeCacheEnabled()
      Whether or not full offer code cache compilation should be performed. See LazyCacheController.
    • 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. See LazyCacheController.
    • 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. Requires isFullCodeCacheEnabled() be true.
    • getFullOfferCacheLimit

      public long getFullOfferCacheLimit()
      The max number of offers to allow into memory when performing full cache load. Requires isFullOfferCacheEnabled() be true.
    • getFullCacheBatchFetchSize

      public long getFullCacheBatchFetchSize()
      The number of items to fetch in batch at a time.
    • getFullCacheWarmupLocales

      public List<String> getFullCacheWarmupLocales()
      The locales to cover in the full cache warmup for offers
    • getDefaultFullCacheLocale

      public String 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

      public Duration getFullOfferByAutomaticThreshold()
      Amount of time between full offer cache compilation operations. Usually smaller than getOfferByAutomatic(). Only used when isFullOfferCacheEnabled() is true.
    • getFullOfferCodeByCodesThreshold

      public Duration getFullOfferCodeByCodesThreshold()
      Amount of time between full offer code cache compilation operations. Usually smaller than getOfferCodeByCodes(). Only used when isFullCodeCacheEnabled() is true.
    • getFullCodeCacheType

      public FullCacheType getFullCodeCacheType()
      Restrict full offer code caching based on activity status
    • getPriorCodeActiveBufferRange

      public Duration getPriorCodeActiveBufferRange()
      Amount of time in the past to include codes that were active. Applies to FullCacheType.RANGE.
    • getFutureCodeActiveBufferRange

      public Duration getFutureCodeActiveBufferRange()
      Amount of time in the future to include codes that will be active. Applies to FullCacheType.RANGE.
    • getFullOfferCacheType

      public FullCacheType getFullOfferCacheType()
      Restrict full offer caching based on activity status
    • getPriorOfferActiveBufferRange

      public Duration getPriorOfferActiveBufferRange()
      Amount of time in the past to include offers that were active. Applies to FullCacheType.RANGE.
    • getFutureOfferActiveBufferRange

      public Duration getFutureOfferActiveBufferRange()
      Amount of time in the future to include offers that will be active. Applies to FullCacheType.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

      public void setOfferByAutomatic(Duration offerByAutomatic)
    • setCampaignByIds

      public void setCampaignByIds(Duration campaignByIds)
    • setOfferByIds

      public void setOfferByIds(Duration offerByIds)
    • setOfferByTracking

      public void setOfferByTracking(Duration offerByTracking)
    • setOfferByUserTargets

      public void setOfferByUserTargets(Duration offerByUserTargets)
    • setOfferCodeByCodes

      public void setOfferCodeByCodes(Duration offerCodeByCodes)
    • setMarketingMessageByOffers

      public void setMarketingMessageByOffers(Duration marketingMessageByOffers)
    • setMarketingMessageByIds

      public void setMarketingMessageByIds(Duration marketingMessageByIds)
    • setFullCodeCacheEnabled

      public void setFullCodeCacheEnabled(boolean fullCodeCacheEnabled)
      Whether or not full offer code cache compilation should be performed. See LazyCacheController.
    • 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. See LazyCacheController.
    • 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. Requires isFullCodeCacheEnabled() be true.
    • setFullOfferCacheLimit

      public void setFullOfferCacheLimit(long fullOfferCacheLimit)
      The max number of offers to allow into memory when performing full cache load. Requires isFullOfferCacheEnabled() be true.
    • setFullCacheBatchFetchSize

      public void setFullCacheBatchFetchSize(long fullCacheBatchFetchSize)
      The number of items to fetch in batch at a time.
    • setFullCacheWarmupLocales

      public void setFullCacheWarmupLocales(List<String> fullCacheWarmupLocales)
      The locales to cover in the full cache warmup for offers
    • setDefaultFullCacheLocale

      public void setDefaultFullCacheLocale(String defaultFullCacheLocale)
      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

      public void setFullOfferByAutomaticThreshold(Duration fullOfferByAutomaticThreshold)
      Amount of time between full offer cache compilation operations. Usually smaller than getOfferByAutomatic(). Only used when isFullOfferCacheEnabled() is true.
    • setFullOfferCodeByCodesThreshold

      public void setFullOfferCodeByCodesThreshold(Duration fullOfferCodeByCodesThreshold)
      Amount of time between full offer code cache compilation operations. Usually smaller than getOfferCodeByCodes(). Only used when isFullCodeCacheEnabled() is true.
    • setFullCodeCacheType

      public void setFullCodeCacheType(FullCacheType fullCodeCacheType)
      Restrict full offer code caching based on activity status
    • setPriorCodeActiveBufferRange

      public void setPriorCodeActiveBufferRange(Duration priorCodeActiveBufferRange)
      Amount of time in the past to include codes that were active. Applies to FullCacheType.RANGE.
    • setFutureCodeActiveBufferRange

      public void setFutureCodeActiveBufferRange(Duration futureCodeActiveBufferRange)
      Amount of time in the future to include codes that will be active. Applies to FullCacheType.RANGE.
    • setFullOfferCacheType

      public void setFullOfferCacheType(FullCacheType fullOfferCacheType)
      Restrict full offer caching based on activity status
    • setPriorOfferActiveBufferRange

      public void setPriorOfferActiveBufferRange(Duration priorOfferActiveBufferRange)
      Amount of time in the past to include offers that were active. Applies to FullCacheType.RANGE.
    • setFutureOfferActiveBufferRange

      public void setFutureOfferActiveBufferRange(Duration futureOfferActiveBufferRange)
      Amount of time in the future to include offers that will be active. Applies to FullCacheType.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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object