[jboss-svn-commits] JBL Code SVN: r9432 - labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Feb 10 23:14:19 EST 2007
Author: mark.proctor at jboss.com
Date: 2007-02-10 23:14:19 -0500 (Sat, 10 Feb 2007)
New Revision: 9432
Modified:
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java
Log:
-reformatting
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java 2007-02-11 03:46:51 UTC (rev 9431)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java 2007-02-11 04:14:19 UTC (rev 9432)
@@ -124,7 +124,7 @@
protected final boolean discardOnLogicalOverride;
protected long propagationIdCounter;
-
+
private final boolean maintainTms;
/** Flag to determine if a rule is currently being fired. */
@@ -147,13 +147,13 @@
this.ruleBase = ruleBase;
this.handleFactory = handleFactory;
this.maintainTms = this.ruleBase.getConfiguration().getMaintainTms();
-
+
if ( this.maintainTms ) {
this.tms = new TruthMaintenanceSystem( this );
} else {
this.tms = null;
}
-
+
this.assertMap = new ObjectHashMap();
final RuleBaseConfiguration conf = this.ruleBase.getConfiguration();
@@ -704,7 +704,7 @@
handle,
false );
}
-
+
if ( dynamic ) {
addPropertyChangeListener( object );
}
@@ -862,16 +862,16 @@
// Update the equality key, which maintains a list of stated
// FactHandles
final EqualityKey key = handle.getEqualityKey();
-
+
// Its justified so attempt to remove any logical dependencies for
// the handle
if ( key.getStatus() == EqualityKey.JUSTIFIED ) {
this.tms.removeLogicalDependencies( handle );
}
-
+
key.removeFactHandle( handle );
handle.setEqualityKey( null );
-
+
// If the equality key is now empty, then remove it
if ( key.isEmpty() ) {
this.tms.remove( key );
@@ -943,22 +943,22 @@
// set anyway, so that it updates the hashCodes
handle.setObject( object );
- if ( this.maintainTms ) {
+ if ( this.maintainTms ) {
// We only need to put objects, if its a new object
if ( originalObject != object ) {
this.assertMap.put( handle,
handle );
}
-
+
// the hashCode and equality has changed, so we must update the EqualityKey
EqualityKey key = handle.getEqualityKey();
key.removeFactHandle( handle );
-
+
// If the equality key is now empty, then remove it
if ( key.isEmpty() ) {
this.tms.remove( key );
}
-
+
// now use an existing EqualityKey, if it exists, else create a new one
key = this.tms.get( object );
if ( key == null ) {
@@ -968,7 +968,7 @@
} else {
key.addFactHandle( handle );
}
-
+
handle.setEqualityKey( key );
}
@@ -1015,12 +1015,14 @@
ruleOrigin,
activationOrigin ) );
}
-
+
public void removeLogicalDependencies(final Activation activation,
final PropagationContext context,
final Rule rule) throws FactException {
if ( this.maintainTms ) {
- this.tms.removeLogicalDependencies( activation, context, rule );
+ this.tms.removeLogicalDependencies( activation,
+ context,
+ rule );
}
}
More information about the jboss-svn-commits
mailing list