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 datastructure which references
all the handles which are equal. Secondly It maintains another map tracking
the justificiations for logically asserted facts.
|
Method Summary |
void |
addLogicalDependency(InternalFactHandle handle,
Object object,
Object value,
Activation activation,
PropagationContext context,
Rule rule,
ObjectTypeConf typeConf)
|
void |
addLogicalDependency(InternalFactHandle handle,
Object object,
Object value,
Activation activation,
PropagationContext context,
Rule rule,
ObjectTypeConf typeConf,
boolean read)
|
void |
clear()
|
EqualityKey |
get(EqualityKey key)
|
EqualityKey |
get(Object object)
|
BeliefSystem |
getBeliefSystem()
|
ObjectHashMap |
getEqualityKeyMap()
|
Object |
put(EqualityKey key)
|
void |
readLogicalDependency(InternalFactHandle handle,
Object object,
Object value,
Activation activation,
PropagationContext context,
Rule rule,
ObjectTypeConf typeConf)
Adds a justification for the FactHandle to the justifiedMap. |
EqualityKey |
remove(EqualityKey key)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TruthMaintenanceSystem
public TruthMaintenanceSystem()
TruthMaintenanceSystem
public TruthMaintenanceSystem(AbstractWorkingMemory wm,
NamedEntryPoint ep)
getEqualityKeyMap
public ObjectHashMap getEqualityKeyMap()
put
public Object put(EqualityKey key)
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,
Rule rule,
ObjectTypeConf typeConf)
throws FactException
- Adds a justification for the FactHandle to the justifiedMap.
- Parameters:
handle - activation - context - rule - typeConf -
- Throws:
FactException
addLogicalDependency
public void addLogicalDependency(InternalFactHandle handle,
Object object,
Object value,
Activation activation,
PropagationContext context,
Rule rule,
ObjectTypeConf typeConf)
throws FactException
- Throws:
FactException
addLogicalDependency
public void addLogicalDependency(InternalFactHandle handle,
Object object,
Object value,
Activation activation,
PropagationContext context,
Rule rule,
ObjectTypeConf typeConf,
boolean read)
throws FactException
- Throws:
FactException
clear
public void clear()
getBeliefSystem
public BeliefSystem getBeliefSystem()
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.