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 toCacheStateManager.computeIfAbsent(Function, ImperativeListCacheInfo)
.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description ImperativeListCacheInfo(String cacheName, Function<Object,String> matchValueFunction, ContextKeyGen generator, List<String> imperativeArgs, Object[] args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
Object[]
getArgs()
Any other method arguments, or other suitable key fragments that should be combined withimperativeArgs
during key generation fromgenerator
.String
getCacheName()
The name of the cache inCacheManager
Function<String,EntityInfo>
getEntityInfoFactoryFunction()
Optional.ContextKeyGen
getGenerator()
TheContextKeyGen
instance responsible for creating a complete and accurate cache key for all the computed members based onimperativeArgs
.List<String>
getImperativeArgs()
A collection of discrete identifying informational items.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 fromimperativeArgs
.int
hashCode()
void
setEntityInfoFactoryFunction(Function<String,EntityInfo> entityInfoFactoryFunction)
Optional.String
toString()
-
-
-
Method Detail
-
getCacheName
public String getCacheName()
The name of the cache inCacheManager
-
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 fromimperativeArgs
.
-
getGenerator
public ContextKeyGen getGenerator()
TheContextKeyGen
instance responsible for creating a complete and accurate cache key for all the computed members based onimperativeArgs
.
-
getImperativeArgs
public List<String> getImperativeArgs()
A collection of discrete identifying informational items. When combined withargs
, each member ofimperativeArgs
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 ofimperativeArgs
are passed to the input param of the function atImperativeListCacheable.computeIfAbsent(Function)
.
-
getArgs
public Object[] getArgs()
Any other method arguments, or other suitable key fragments that should be combined withimperativeArgs
during key generation fromgenerator
.
-
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.
-
canEqual
protected boolean canEqual(Object other)
-
-