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

public class CacheInfo extends Object
Basic information used for interaction with the CacheManager during a CacheUtility.forSingleWith(CacheStateManager) call.
Author:
Jeff Fischer
  • Constructor Details

  • Method Details

    • getCacheName

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

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

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

      @Deprecated public Supplier<EntityInfo> getFactoryFunction()
      Deprecated.
      use infoFunction instead
      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.
    • getInfoFunction

      public Function<Stream<?>,List<EntityInfo>> getInfoFunction()
      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. The input to the function is the result of SingleItemCacheable.computeIfAbsent(Supplier). If the input happens to be streamable, this it's stream is used. Otherwise, a single item list of the specific result of computeIfAbsent is streamed. The output of the function is the one or more info DTO instances targeting entities whose update will target invalidation of this cache.
    • setFactoryFunction

      @Deprecated public void setFactoryFunction(Supplier<EntityInfo> factoryFunction)
      Deprecated.
      use infoFunction instead
      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.
    • setInfoFunction

      public void setInfoFunction(Function<Stream<?>,List<EntityInfo>> infoFunction)
      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. The input to the function is the result of SingleItemCacheable.computeIfAbsent(Supplier). If the input happens to be streamable, this it's stream is used. Otherwise, a single item list of the specific result of computeIfAbsent is streamed. The output of the function is the one or more info DTO instances targeting entities whose update will target invalidation of this cache.
    • 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