Class RuleMatchCountListener

java.lang.Object
org.drools.core.event.DefaultAgendaEventListener
de.hybris.platform.ruleengine.impl.RuleMatchCountListener
All Implemented Interfaces:
RuleExecutionCountListener, 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 a DroolsRuleLoopException if the given threshold is exceeded, thereby preventing a potentially infinite loop.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent event)
     
    protected long
     
    void
     

    Methods inherited from class org.drools.core.event.DefaultAgendaEventListener

    afterRuleFlowGroupActivated, afterRuleFlowGroupDeactivated, agendaGroupPopped, agendaGroupPushed, beforeMatchFired, beforeRuleFlowGroupActivated, beforeRuleFlowGroupDeactivated, matchCancelled, matchCreated

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.kie.api.event.rule.AgendaEventListener

    afterRuleFlowGroupActivated, afterRuleFlowGroupDeactivated, agendaGroupPopped, agendaGroupPushed, beforeMatchFired, beforeRuleFlowGroupActivated, beforeRuleFlowGroupDeactivated, matchCancelled, matchCreated
  • Constructor Details

    • RuleMatchCountListener

      public RuleMatchCountListener()
  • Method Details

    • afterMatchFired

      public void afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent event)
      Specified by:
      afterMatchFired in interface org.kie.api.event.rule.AgendaEventListener
      Overrides:
      afterMatchFired in class org.drools.core.event.DefaultAgendaEventListener
    • setExecutionLimit

      public void setExecutionLimit(long max)
      Specified by:
      setExecutionLimit in interface RuleExecutionCountListener
    • getExecutionLimit

      protected long getExecutionLimit()