Class DefaultSingleItemChainable
- java.lang.Object
-
- com.broadleafcommerce.common.extension.cache.api.DefaultSingleItemChainable
-
- All Implemented Interfaces:
SingleItemCacheable
,SingleItemChainable
public class DefaultSingleItemChainable extends Object implements SingleItemChainable, SingleItemCacheable
Default transition object for holding state during method chaining fromCacheUtility.forSingleWith(CacheStateManager)
.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description DefaultSingleItemChainable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SingleItemCacheable
andCacheInfo(String cacheName, ContextKeyGen generator, Object[] args)
SingleItemCacheable
andEntityInfo(Supplier<EntityInfo> factoryFunction)
Optional.protected boolean
canEqual(Object other)
<P> P
computeIfAbsent(Supplier<P> compute)
boolean
equals(Object o)
CacheInfo
getCacheInfo()
CacheStateManager
getCacheStateManager()
Supplier<?>
getSingleItemFunction()
int
hashCode()
void
setCacheInfo(CacheInfo cacheInfo)
void
setCacheStateManager(CacheStateManager cacheStateManager)
void
setSingleItemFunction(Supplier<?> singleItemFunction)
String
toString()
SingleItemChainable
with(CacheStateManager cacheStateManager)
-
-
-
Method Detail
-
with
public SingleItemChainable with(CacheStateManager cacheStateManager)
-
andCacheInfo
public SingleItemCacheable andCacheInfo(String cacheName, ContextKeyGen generator, Object[] args)
- Specified by:
andCacheInfo
in interfaceSingleItemChainable
-
andEntityInfo
public SingleItemCacheable andEntityInfo(Supplier<EntityInfo> factoryFunction)
Description copied from interface:SingleItemCacheable
Optional. Provide additional, identifying information about the cache member via the factory function. 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 interfaceSingleItemCacheable
- Parameters:
factoryFunction
- Used to construct additional, identifying information about the cache member- Returns:
- The chained element
-
computeIfAbsent
public <P> P computeIfAbsent(Supplier<P> compute)
- Specified by:
computeIfAbsent
in interfaceSingleItemCacheable
-
getCacheStateManager
public CacheStateManager getCacheStateManager()
-
getCacheInfo
public CacheInfo getCacheInfo()
-
getSingleItemFunction
public Supplier<?> getSingleItemFunction()
-
setCacheStateManager
public void setCacheStateManager(CacheStateManager cacheStateManager)
-
setCacheInfo
public void setCacheInfo(CacheInfo cacheInfo)
-
setSingleItemFunction
public void setSingleItemFunction(Supplier<?> singleItemFunction)
-
canEqual
protected boolean canEqual(Object other)
-
-