Package org.drools.core.common
Interface TruthMaintenanceSystem
public interface TruthMaintenanceSystem
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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voiddelete(FactHandle fh) voiddeleteFromTms(InternalFactHandle handle, EqualityKey key, PropagationContext propagationContext) intinsert(Object object, Object tmsValue, InternalMatch internalMatch) insertOnTms(Object object, ObjectTypeConf typeConf, PropagationContext propagationContext, InternalFactHandle handle, BiFunction<Object, ObjectTypeConf, InternalFactHandle> fhFactory) insertPositive(Object object, InternalMatch internalMatch) voidput(EqualityKey key) voidreadLogicalDependency(InternalFactHandle handle, Object object, Object value, InternalMatch internalMatch, ObjectTypeConf typeConf) voidremove(EqualityKey key) voidupdateOnTms(InternalFactHandle handle, Object object, InternalMatch internalMatch)
-
Method Details
-
getEqualityKeysSize
int getEqualityKeysSize() -
getEqualityKeys
Collection<EqualityKey> getEqualityKeys() -
put
-
get
-
remove
-
insert
-
insertPositive
-
delete
-
readLogicalDependency
void readLogicalDependency(InternalFactHandle handle, Object object, Object value, InternalMatch internalMatch, ObjectTypeConf typeConf) -
clear
void clear() -
insertOnTms
InternalFactHandle insertOnTms(Object object, ObjectTypeConf typeConf, PropagationContext propagationContext, InternalFactHandle handle, BiFunction<Object, ObjectTypeConf, InternalFactHandle> fhFactory) -
updateOnTms
-
deleteFromTms
void deleteFromTms(InternalFactHandle handle, EqualityKey key, PropagationContext propagationContext)
-