Package org.droolsassert
Class RulesChronoAgendaEventListener
java.lang.Object
org.kie.api.event.rule.DefaultAgendaEventListener
org.droolsassert.RulesChronoAgendaEventListener
- All Implemented Interfaces:
EventListener,org.kie.api.event.rule.AgendaEventListener
- Direct Known Subclasses:
RulesChronoChartRecorder
public class RulesChronoAgendaEventListener
extends org.kie.api.event.rule.DefaultAgendaEventListener
Collect live performance statistic for rules (then block) as aggregated
Serializable result.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longprotected final ConcurrentHashMap<String,PerfStat> protected Stringprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionCreatesRulesChronoAgendaEventListenerwith default aggregation periodRulesChronoAgendaEventListener(long aggregationPeriodMs) CreatesRulesChronoAgendaEventListenerwith aggregation period -
Method Summary
Modifier and TypeMethodDescriptionvoidafterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent event) voidbeforeMatchFired(org.kie.api.event.rule.BeforeMatchFiredEvent event) voidreset()withPackageName(boolean usePackageName) Include rule package name to qualify rule name, false by defaultwithSessionPrefix(String sessionPrefix) Include unique session prefix to segregate statistic.
Optional unless you want to use different aggregation periods for the same rule names.
If several listeners gather statistic under the same name statistic will be merged and 'peer' counter increased.Methods inherited from class org.kie.api.event.rule.DefaultAgendaEventListener
afterRuleFlowGroupActivated, afterRuleFlowGroupDeactivated, agendaGroupPopped, agendaGroupPushed, beforeRuleFlowGroupActivated, beforeRuleFlowGroupDeactivated, matchCancelled, matchCreated
-
Field Details
-
rulesStat
-
aggregationPeriodMs
protected final long aggregationPeriodMs -
sessionPrefix
-
usePackageName
protected boolean usePackageName
-
-
Constructor Details
-
RulesChronoAgendaEventListener
public RulesChronoAgendaEventListener()CreatesRulesChronoAgendaEventListenerwith default aggregation period -
RulesChronoAgendaEventListener
public RulesChronoAgendaEventListener(long aggregationPeriodMs) CreatesRulesChronoAgendaEventListenerwith aggregation period- Parameters:
aggregationPeriodMs-
-
-
Method Details
-
withPackageName
Include rule package name to qualify rule name, false by default -
withSessionPrefix
Include unique session prefix to segregate statistic.
Optional unless you want to use different aggregation periods for the same rule names.
If several listeners gather statistic under the same name statistic will be merged and 'peer' counter increased. -
getPerfStat
-
beforeMatchFired
public void beforeMatchFired(org.kie.api.event.rule.BeforeMatchFiredEvent event) - Specified by:
beforeMatchFiredin interfaceorg.kie.api.event.rule.AgendaEventListener- Overrides:
beforeMatchFiredin classorg.kie.api.event.rule.DefaultAgendaEventListener
-
afterMatchFired
public void afterMatchFired(org.kie.api.event.rule.AfterMatchFiredEvent event) - Specified by:
afterMatchFiredin interfaceorg.kie.api.event.rule.AgendaEventListener- Overrides:
afterMatchFiredin classorg.kie.api.event.rule.DefaultAgendaEventListener
-
reset
public void reset()
-