Class 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 a DroolsRuleLoopException if the given threshold is exceeded, thereby preventing a potentially infinite loop.
    • 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
      • 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 Detail

      • RuleMatchCountListener

        public RuleMatchCountListener()
    • Method Detail

      • 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
      • getExecutionLimit

        protected long getExecutionLimit()