Class RuleMatchCountListener
- java.lang.Object
-
- org.drools.core.event.DefaultAgendaEventListener
-
- de.hybris.platform.ruleengine.impl.RuleMatchCountListener
-
- All Implemented Interfaces:
RuleExecutionCountListener
,java.util.EventListener
,org.kie.api.event.rule.AgendaEventListener
public class RuleMatchCountListener extends org.drools.core.event.DefaultAgendaEventListener implements RuleExecutionCountListener
RuleMatchCountListener counts the number (per rule) of match-fired events and throws aDroolsRuleLoopException
if the given threshold is exceeded, thereby preventing a potentially infinite loop.
-
-
Constructor Summary
Constructors Constructor Description RuleMatchCountListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent event)
protected long
getExecutionLimit()
void
setExecutionLimit(long max)
-
Methods inherited from class org.drools.core.event.DefaultAgendaEventListener
afterRuleFlowGroupActivated, afterRuleFlowGroupDeactivated, agendaGroupPopped, agendaGroupPushed, beforeMatchFired, beforeRuleFlowGroupActivated, beforeRuleFlowGroupDeactivated, matchCancelled, matchCreated
-
-
-
-
Method Detail
-
afterMatchFired
public void afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent event)
- Specified by:
afterMatchFired
in interfaceorg.kie.api.event.rule.AgendaEventListener
- Overrides:
afterMatchFired
in classorg.drools.core.event.DefaultAgendaEventListener
-
setExecutionLimit
public void setExecutionLimit(long max)
- Specified by:
setExecutionLimit
in interfaceRuleExecutionCountListener
-
getExecutionLimit
protected long getExecutionLimit()
-
-