|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.drools.WorkingMemory | +--org.drools.TransactionalWorkingMemory
A transactional knowledge session for a RuleBase
.
A WorkingMemory
which caches all assertion, retractions
and modifications, and only performs the fact propagation and
rule action invokation upon commit()
.
WorkingMemory
,
RuleBase
Constructor Summary | |
TransactionalWorkingMemory(RuleBase ruleBase)
Construct. |
Method Summary | |
void |
abort()
Abort this TransactionalWorkingMemory ,
by tossing out all asserted objects, and reseting
this TransactionalWorkingMemory to a
clean state. |
void |
assertObject(java.lang.Object object)
Assert a new fact object into this working memory. |
void |
commit()
Commit all asserted objects into the logic engine, and reset this TransactionalWorkingMemory
to a clean state. |
void |
modifyObject(java.lang.Object object)
Modify a fact object in this working memory. |
void |
retractObject(java.lang.Object object)
Retract a fact object from this working memory. |
Methods inherited from class org.drools.WorkingMemory |
getAgenda, getJoinMemory, getRuleBase, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TransactionalWorkingMemory(RuleBase ruleBase)
ruleBase
- The RuleBase
for this WorkingMemory
.Method Detail |
public void abort()
TransactionalWorkingMemory
,
by tossing out all asserted objects, and reseting
this TransactionalWorkingMemory
to a
clean state.
public void commit() throws DroolsException
TransactionalWorkingMemory
to a clean state.
DroolsException
- If anpublic void assertObject(java.lang.Object object) throws AssertionException
assertObject
in class WorkingMemory
object
- The object to assert.
AssertionException
- if an error occurs during assertion.public void modifyObject(java.lang.Object object) throws FactException
modifyObject
in class WorkingMemory
object
- The object to modify.
FactException
- if an error occurs during modification.public void retractObject(java.lang.Object object) throws RetractionException
retractObject
in class WorkingMemory
object
- The object to retract.
RetractionException
- if an error occurs during retraction.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |