Class DefaultRuleEngineCacheService
- java.lang.Object
-
- de.hybris.platform.ruleengine.cache.impl.DefaultRuleEngineCacheService
-
- All Implemented Interfaces:
RuleEngineCacheService
- Direct Known Subclasses:
DefaultCommerceRuleEngineCacheService
public class DefaultRuleEngineCacheService extends java.lang.Object implements RuleEngineCacheService
The DefaultRuleEngineCacheService of the RuleEngineCacheService provides methods to add and retrieve the cached entities from the global cache.
-
-
Constructor Summary
Constructors Constructor Description DefaultRuleEngineCacheService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToCache(KIEModuleCacheBuilder cacheBuilder)adds the cached entities of the given cache builder to the global caching structure.KIEModuleCacheBuildercreateKIEModuleCacheBuilder(DroolsKIEModuleModel kieModule)creates a KIEModuleCacheBuilder object for the given kieModule.protected RuleEngineCachegetRuleEngineCache()voidprovideCachedEntities(RuleEvaluationContext context)is invoked duringDefaultPlatformRuleEngineService.evaluate(de.hybris.platform.ruleengine.RuleEvaluationContext)and adds any cached entities (such as globals or facts) to the given context.voidsetRuleEngineCache(RuleEngineCache globalsCache)
-
-
-
Method Detail
-
createKIEModuleCacheBuilder
public KIEModuleCacheBuilder createKIEModuleCacheBuilder(DroolsKIEModuleModel kieModule)
Description copied from interface:RuleEngineCacheServicecreates a KIEModuleCacheBuilder object for the given kieModule. The cache builder processes the kie module's rules (seeKIEModuleCacheBuilder.processRule(AbstractRuleEngineRuleModel). In order to add the cache for the module useRuleEngineCacheService.addToCache(KIEModuleCacheBuilder).- Specified by:
createKIEModuleCacheBuilderin interfaceRuleEngineCacheService- Parameters:
kieModule- the instance ofDroolsKIEModuleModelfor which to create the cached items- Returns:
- a newly instantiated cache builder for the given kieModule
-
addToCache
public void addToCache(KIEModuleCacheBuilder cacheBuilder)
Description copied from interface:RuleEngineCacheServiceadds the cached entities of the given cache builder to the global caching structure.- Specified by:
addToCachein interfaceRuleEngineCacheService- Parameters:
cacheBuilder- the cache builder to use
-
provideCachedEntities
public void provideCachedEntities(RuleEvaluationContext context)
Description copied from interface:RuleEngineCacheServiceis invoked duringDefaultPlatformRuleEngineService.evaluate(de.hybris.platform.ruleengine.RuleEvaluationContext)and adds any cached entities (such as globals or facts) to the given context.- Specified by:
provideCachedEntitiesin interfaceRuleEngineCacheService- Parameters:
context- the context object to enhance with facts
-
getRuleEngineCache
protected RuleEngineCache getRuleEngineCache()
-
setRuleEngineCache
public void setRuleEngineCache(RuleEngineCache globalsCache)
-
-