|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.common.AbstractRuleBase
org.drools.leaps.LeapsRuleBase
public class LeapsRuleBase
This base class for the engine and analogous to Drool's RuleBase class. It has a similar interface adapted to the Leaps algorithm
Field Summary |
---|
Fields inherited from class org.drools.common.AbstractRuleBase |
---|
config, factHandleFactory, globals, packageClassLoader, pkgs, PRESENT, workingMemories |
Fields inherited from interface org.drools.RuleBase |
---|
LEAPS, RETEOO |
Constructor Summary | |
---|---|
LeapsRuleBase()
Construct. |
|
LeapsRuleBase(RuleBaseConfiguration config,
FactHandleFactory factHandleFactory)
Construct. |
Method Summary | |
---|---|
void |
addRule(Rule rule)
Creates leaps rule wrappers and propagate rule to the working memories |
void |
assertObject(FactHandle handle,
java.lang.Object object,
PropagationContext context,
ReteooWorkingMemory workingMemory)
Assert a fact object. |
void |
modifyObject(FactHandle handle,
PropagationContext context,
ReteooWorkingMemory workingMemory)
|
WorkingMemory |
newWorkingMemory()
Create a new WorkingMemory session for this
RuleBase . |
WorkingMemory |
newWorkingMemory(boolean keepReference)
Create a new WorkingMemory session for this
RuleBase . |
void |
readExternal(java.io.ObjectInput stream)
Handles the read serialization of the Package. |
void |
removeRule(Rule rule)
|
void |
retractObject(FactHandle handle,
PropagationContext context,
ReteooWorkingMemory workingMemory)
Retract a fact object. |
void |
writeExternal(java.io.ObjectOutput stream)
Handles the write serialization of the Package. |
Methods inherited from class org.drools.common.AbstractRuleBase |
---|
addPackage, addWorkingMemory, disposeWorkingMemory, doReadExternal, doWriteExternal, getConfiguration, getFactHandleFactory, getGlobals, getPackages, getWorkingMemories, newFactHandleFactory, newWorkingMemory, newWorkingMemory, removePackage, removeRule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LeapsRuleBase() throws PackageIntegrationException
rete
- The rete network.
PackageIntegrationException
public LeapsRuleBase(RuleBaseConfiguration config, FactHandleFactory factHandleFactory)
rete
- The rete network.conflictResolver
- The conflict resolver.factHandleFactory
- The fact handle factory.pkgs
- applicationData
-
PackageIntegrationException
java.lang.Exception
Method Detail |
---|
public WorkingMemory newWorkingMemory()
RuleBase
WorkingMemory
session for this
RuleBase
. By default the RuleBase retains a
weak reference to returned WorkingMemory.
The created WorkingMemory
uses the default conflict
resolution strategy.
newWorkingMemory
in interface RuleBase
newWorkingMemory
in class AbstractRuleBase
WorkingMemory
.RuleBase
public WorkingMemory newWorkingMemory(boolean keepReference)
RuleBase
WorkingMemory
session for this
RuleBase
. Optionally the RuleBase retains a
weak reference to returned WorkingMemory.
The created WorkingMemory
uses the default conflict
resolution strategy.
newWorkingMemory
in interface RuleBase
newWorkingMemory
in class AbstractRuleBase
WorkingMemory
.RuleBase
public void addRule(Rule rule) throws FactException, InvalidPatternException
addRule
in class AbstractRuleBase
rule
-
FactException
InvalidPatternException
public void removeRule(Rule rule)
removeRule
in class AbstractRuleBase
public void writeExternal(java.io.ObjectOutput stream) throws java.io.IOException
java.io.IOException
public void readExternal(java.io.ObjectInput stream) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void assertObject(FactHandle handle, java.lang.Object object, PropagationContext context, ReteooWorkingMemory workingMemory) throws FactException
InternalRuleBase
handle
- The handle.object
- The fact.workingMemory
- The working-memory.
FactException
- If an error occurs while performing the assertion.public void modifyObject(FactHandle handle, PropagationContext context, ReteooWorkingMemory workingMemory) throws FactException
FactException
public void retractObject(FactHandle handle, PropagationContext context, ReteooWorkingMemory workingMemory) throws FactException
InternalRuleBase
handle
- The handle.workingMemory
- The working-memory.
FactException
- If an error occurs while performing the retraction.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |