[jboss-svn-commits] JBL Code SVN: r31918 - labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Mar 3 13:56:39 EST 2010
Author: ge0ffrey
Date: 2010-03-03 13:56:38 -0500 (Wed, 03 Mar 2010)
New Revision: 31918
Modified:
labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml
Log:
true modify in docs
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml 2010-03-03 18:44:24 UTC (rev 31917)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml 2010-03-03 18:56:38 UTC (rev 31918)
@@ -145,15 +145,12 @@
<programlisting> public void doMove(WorkingMemory workingMemory) {
FactHandle queenHandle = workingMemory.getFactHandle(queen);
- workingMemory.modifyRetract(queenHandle); // before changes are made
queen.setY(toY);
- workingMemory.modifyInsert(queenHandle, queen); // after changes are made
+ workingMemory.update(queenHandle, queen); // after changes are made
}</programlisting>
- <para>Drools Planner disables shadow facts for increased performance, so you cannot use the
- <literal>workingMemory.update(FactHandle, Object)</literal> method, instead you need to call the
- <literal>workingMemory.modifyRetract(FactHandle)</literal> method before modifying the fact and the
- <literal>workingMemory.modifyInsert(FactHandle, Object)</literal> method after modifying the fact. Note that you can
+ <para>You need to call the
+ <literal>workingMemory.update(FactHandle, Object)</literal> method after modifying the fact. Note that you can
alter multiple facts in a single move and effectively create a big move (also known as a coarse-grained
move).</para>
More information about the jboss-svn-commits
mailing list