Class DefaultIncrementalRuleEngineUpdateStrategy
java.lang.Object
de.hybris.platform.ruleengine.init.impl.DefaultIncrementalRuleEngineUpdateStrategy
- All Implemented Interfaces:
IncrementalRuleEngineUpdateStrategy
public class DefaultIncrementalRuleEngineUpdateStrategy
extends Object
implements IncrementalRuleEngineUpdateStrategy
Default implementation of
IncrementalRuleEngineUpdateStrategy interface-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected EngineRulesRepositoryprotected floatprotected intvoidsetEngineRulesRepository(EngineRulesRepository engineRulesRepository) voidsetFractionOfRulesThreshold(float fractionOfRulesThreshold) voidsetTotalNumOfRulesThreshold(int totalNumOfRulesThreshold) booleanshouldUpdateIncrementally(org.kie.api.builder.ReleaseId releaseId, String moduleName, Collection<DroolsRuleModel> rulesToAdd, Collection<DroolsRuleModel> rulesToRemove) Given the rules module and the list (per kie base) of rules to add and remove, returns true if the incremental update would be the better strategy, false otherwise
-
Constructor Details
-
DefaultIncrementalRuleEngineUpdateStrategy
public DefaultIncrementalRuleEngineUpdateStrategy()
-
-
Method Details
-
shouldUpdateIncrementally
public boolean shouldUpdateIncrementally(org.kie.api.builder.ReleaseId releaseId, String moduleName, Collection<DroolsRuleModel> rulesToAdd, Collection<DroolsRuleModel> rulesToRemove) Description copied from interface:IncrementalRuleEngineUpdateStrategyGiven the rules module and the list (per kie base) of rules to add and remove, returns true if the incremental update would be the better strategy, false otherwise- Specified by:
shouldUpdateIncrementallyin interfaceIncrementalRuleEngineUpdateStrategy- Parameters:
releaseId- instance of currently deployed kie containerReleaseIdmoduleName- name of the rules modulerulesToAdd- collection of drool rules to be added or updatedrulesToRemove- collection of drool rules to be removed- Returns:
- true if the incremental rule engine update should be applied, false otherwise
-
getEngineRulesRepository
-
setEngineRulesRepository
-
getTotalNumOfRulesThreshold
protected int getTotalNumOfRulesThreshold() -
setTotalNumOfRulesThreshold
public void setTotalNumOfRulesThreshold(int totalNumOfRulesThreshold) -
getFractionOfRulesThreshold
protected float getFractionOfRulesThreshold() -
setFractionOfRulesThreshold
public void setFractionOfRulesThreshold(float fractionOfRulesThreshold)
-