Package org.drools.core.common
Class TruthMaintenanceSystem
- java.lang.Object
-
- org.drools.core.common.TruthMaintenanceSystem
-
public class TruthMaintenanceSystem extends Object
The Truth Maintenance System is responsible for tracking two things. Firstly It maintains a Map to track the classes with the same Equality, using the EqualityKey. The EqualityKey has an internal data structure which references all the handles which are equal. Secondly It maintains another map tracking the justifications for logically asserted facts.
-
-
Constructor Summary
Constructors Constructor Description TruthMaintenanceSystem()
TruthMaintenanceSystem(StatefulKnowledgeSessionImpl wm, InternalWorkingMemoryEntryPoint ep)
-
Method Summary
-
-
-
Constructor Detail
-
TruthMaintenanceSystem
public TruthMaintenanceSystem()
-
TruthMaintenanceSystem
public TruthMaintenanceSystem(StatefulKnowledgeSessionImpl wm, InternalWorkingMemoryEntryPoint ep)
-
-
Method Detail
-
getEqualityKeyMap
public ObjectHashMap getEqualityKeyMap()
-
put
public Object put(EqualityKey key)
-
insert
public InternalFactHandle insert(Object object, Object tmsValue, RuleImpl rule, Activation activation)
-
delete
public void delete(org.kie.api.runtime.rule.FactHandle fh)
-
get
public EqualityKey get(EqualityKey key)
-
get
public EqualityKey get(Object object)
-
remove
public EqualityKey remove(EqualityKey key)
-
readLogicalDependency
public void readLogicalDependency(InternalFactHandle handle, Object object, Object value, Activation activation, PropagationContext context, RuleImpl rule, ObjectTypeConf typeConf)
Adds a justification for the FactHandle to the justifiedMap.- Parameters:
handle
-activation
-context
-rule
-typeConf
-
-
addLogicalDependency
public InternalFactHandle addLogicalDependency(InternalFactHandle handle, Object object, Object value, Activation activation, PropagationContext context, RuleImpl rule, ObjectTypeConf typeConf)
-
addLogicalDependency
public InternalFactHandle addLogicalDependency(InternalFactHandle handle, Object object, Object value, Activation activation, PropagationContext context, RuleImpl rule, ObjectTypeConf typeConf, boolean read)
-
clear
public void clear()
-
getBeliefSystem
public BeliefSystem getBeliefSystem()
-
-