Class DefaultImperativeListChainable
- java.lang.Object
-
- com.broadleafcommerce.common.extension.cache.api.DefaultImperativeListChainable
-
- All Implemented Interfaces:
ImperativeListCacheable
,ImperativeListChainable
public class DefaultImperativeListChainable extends Object implements ImperativeListChainable, ImperativeListCacheable
Default transition object for holding state during method chaining fromCacheUtility.forListWith(CacheStateManager)
.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description DefaultImperativeListChainable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImperativeListCacheable
andCacheInfo(String cacheName, Function<Object,String> matchFunction, ContextKeyGen generator, List<String> imperativeArgs, Object[] args)
ImperativeListCacheable
andEntityInfo(Function<String,EntityInfo> factoryFunction)
Optional.protected boolean
canEqual(Object other)
<P> List<P>
computeIfAbsent(Function<List<String>,List<P>> compute)
boolean
equals(Object o)
CacheStateManager
getCacheStateManager()
ImperativeListCacheInfo
getImperativeListCacheInfo()
int
hashCode()
void
setCacheStateManager(CacheStateManager cacheStateManager)
void
setImperativeListCacheInfo(ImperativeListCacheInfo imperativeListCacheInfo)
String
toString()
ImperativeListChainable
with(CacheStateManager cacheStateManager)
-
-
-
Method Detail
-
with
public ImperativeListChainable with(CacheStateManager cacheStateManager)
-
andCacheInfo
public ImperativeListCacheable andCacheInfo(String cacheName, Function<Object,String> matchFunction, ContextKeyGen generator, List<String> imperativeArgs, Object[] args)
- Specified by:
andCacheInfo
in interfaceImperativeListChainable
-
andEntityInfo
public ImperativeListCacheable andEntityInfo(Function<String,EntityInfo> factoryFunction)
Description copied from interface:ImperativeListCacheable
Optional. Provide additional, identifying information about the cache member via the factory function. The string passed to the factory function is taken from each member ofImperativeListCacheInfo.getImperativeArgs()
and is often useful to provide as the id argument duringEntityInfo
construction. This information is used to influence the cache key, allowing the identifying information to be discerned by other processes (e.g. discrete cache invalidation).- Specified by:
andEntityInfo
in interfaceImperativeListCacheable
- Parameters:
factoryFunction
- Used to construct additional, identifying information about the cache member- Returns:
- The chained element
-
computeIfAbsent
public <P> List<P> computeIfAbsent(Function<List<String>,List<P>> compute)
- Specified by:
computeIfAbsent
in interfaceImperativeListCacheable
-
getCacheStateManager
public CacheStateManager getCacheStateManager()
-
getImperativeListCacheInfo
public ImperativeListCacheInfo getImperativeListCacheInfo()
-
setCacheStateManager
public void setCacheStateManager(CacheStateManager cacheStateManager)
-
setImperativeListCacheInfo
public void setImperativeListCacheInfo(ImperativeListCacheInfo imperativeListCacheInfo)
-
canEqual
protected boolean canEqual(Object other)
-
-