Fix loss of some rule matcher probes with state crucial for incremental sessions

This commit is contained in:
Grigorii Kirgizov 2020-04-19 03:13:33 +03:00
parent 22921b9b17
commit c6dca919ca
1 changed files with 3 additions and 2 deletions

View File

@ -247,7 +247,8 @@ internal class ReteRuleMatcherImpl(private var ruleLookup: RuleLookup,
nodeList.add(node)
}
fun occurrencesCount() = introTrail.size()
fun hasOccurrences(): Boolean
= introTrail.size() > 0 || updateQueue.size > 0
fun containsOccurrence(occ: Occurrence): Boolean {
return introTrail.contains(occ.identity)
@ -407,7 +408,7 @@ internal class ReteRuleMatcherImpl(private var ruleLookup: RuleLookup,
}
fun hasOccurrences(): Boolean {
return layers.any { it.occurrencesCount() > 0 }
return layers.any { it.hasOccurrences() }
}
fun reset(): Generation {