public interface ActivationManager extends Predicate<RuntimeRule>
Activation manager controls whether an active rule should really fire based on the history of previous activations. Each session is provided with its own instance of activation manager.
| Modifier and Type | Method and Description |
|---|---|
default void |
onActivation(RuntimeRule rule)
Deprecated.
|
default void |
onActivation(RuntimeRule rule,
long count)
This method is called after rule activation.
|
default void |
onAgenda(int sequenceId,
List<RuntimeRule> agenda)
This method is called once for each memory change and before any rule activations.
|
default boolean |
test(RuntimeRule rule) |
default void onAgenda(int sequenceId,
List<RuntimeRule> agenda)
This method is called once for each memory change and before any rule activations. A unique sequence id is supplied as an argument so that developers could distinguish the initial fire and subsequent changes in the working memory caused by RHS calls.
sequenceId - memory task counter starting at zero (initial session fire)agenda - rules that are activated by current changes in the working memory.default boolean test(RuntimeRule rule)
test in interface Predicate<RuntimeRule>rule - the rule to be allowed or disallowed for activation@Deprecated default void onActivation(RuntimeRule rule)
default void onActivation(RuntimeRule rule, long count)
test() methodrule - the rule that has been activatedcount - the number of times the rule's RHS part has been calledCopyright © 2021. All rights reserved.