Class ImperativeListCacheInfo

java.lang.Object
com.broadleafcommerce.common.extension.cache.api.ImperativeListCacheInfo

public class ImperativeListCacheInfo extends Object
Store basic information about cache as it relates to calls to CacheStateManager.computeIfAbsent(Function, ImperativeListCacheInfo).
Author:
Jeff Fischer
  • Constructor Details

  • Method Details

    • getCacheName

      public String getCacheName()
      The name of the cache in CacheManager
    • getMatchValueFunction

      public Function<Object,String> getMatchValueFunction()
      A function that takes in a cacheable object instance and returns a field value that will be used to match to values from imperativeArgs.
    • getGenerator

      public ContextKeyGen getGenerator()
      The ContextKeyGen instance responsible for creating a complete and accurate cache key for all the computed members based on imperativeArgs.
    • getImperativeArgs

      public List<String> getImperativeArgs()
      A collection of discrete identifying informational items. When combined with args, each member of imperativeArgs serves as an appropriate key for cache. These values are often very specific elements, like primary keys. During cache resolution, if cache misses are found, the missing quantity of imperativeArgs are passed to the input param of the function at ImperativeListCacheable.computeIfAbsent(Function).
    • getArgs

      public Object[] getArgs()
      Any other method arguments, or other suitable key fragments that should be combined with imperativeArgs during key generation from generator.
    • getEntityInfoFactoryFunction

      public Function<String,EntityInfo> getEntityInfoFactoryFunction()
      Optional. Create an identifying construct that will influence the cache key. This is useful when it is required to support discrete cache invalidation for members related to specific entities.
    • setEntityInfoFactoryFunction

      public void setEntityInfoFactoryFunction(Function<String,EntityInfo> entityInfoFactoryFunction)
      Optional. Create an identifying construct that will influence the cache key. This is useful when it is required to support discrete cache invalidation for members related to specific entities.
    • 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