|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.common.AbstractRuleBase
org.drools.reteoo.ReteooRuleBase
public class ReteooRuleBase
Implementation of RuleBase.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.drools.common.AbstractRuleBase |
|---|
AbstractRuleBase.RuleBaseAction |
| Field Summary | |
|---|---|
Set<EntryPointNode> |
addedEntryNodeCache
|
Set<EntryPointNode> |
removedEntryNodeCache
|
| Fields inherited from class org.drools.common.AbstractRuleBase |
|---|
pkgs |
| Fields inherited from interface org.drools.RuleBase |
|---|
RETEOO |
| Constructor Summary | |
|---|---|
ReteooRuleBase()
Default constructor - for Externalizable. |
|
ReteooRuleBase(RuleBaseConfiguration config)
|
|
ReteooRuleBase(String id)
Construct. |
|
ReteooRuleBase(String id,
FactHandleFactory factHandleFactory)
|
|
ReteooRuleBase(String id,
RuleBaseConfiguration config)
|
|
ReteooRuleBase(String id,
RuleBaseConfiguration config,
FactHandleFactory factHandleFactory)
Construct. |
|
| Method Summary | |
|---|---|
protected void |
addEntryPoint(String id)
This method is called with the rulebase lock held. |
void |
addPackage(Package newPkg)
|
void |
addPackages(Collection<Package> pkgs)
Add a Package to the network. |
void |
addPackages(Package[] pkgs)
|
protected void |
addRule(Rule rule)
This method is called with the rulebase lock held. |
protected void |
addWindowDeclaration(WindowDeclaration window)
This method is called with the rulebase lock held. |
void |
assertObject(FactHandle handle,
Object object,
PropagationContext context,
InternalWorkingMemory workingMemory)
Assert a fact object. |
Set<EntryPointNode> |
getAddedEntryNodeCache()
|
int |
getNodeCount()
|
Set<EntryPointNode> |
getRemovedEntryNodeCache()
|
Rete |
getRete()
Retrieve the Rete-OO network for this RuleBase. |
ReteooBuilder |
getReteooBuilder()
|
StatefulSession |
newStatefulSession(boolean keepReference)
|
StatefulSession |
newStatefulSession(InputStream stream)
|
StatefulSession |
newStatefulSession(InputStream stream,
boolean keepReference)
|
StatefulSession |
newStatefulSession(InputStream stream,
boolean keepReference,
SessionConfiguration conf)
|
StatefulSession |
newStatefulSession(SessionConfiguration sessionConfig,
org.drools.runtime.Environment environment)
Create a new WorkingMemory session for this
RuleBase. |
StatelessSession |
newStatelessSession()
|
void |
readExternal(ObjectInput stream)
Handles the read serialization of the Package. |
void |
registerAddedEntryNodeCache(EntryPointNode node)
|
void |
registeRremovedEntryNodeCache(EntryPointNode node)
|
protected void |
removeRule(Rule rule)
Handle rule removal. |
void |
retractObject(FactHandle handle,
PropagationContext context,
ReteooWorkingMemory workingMemory)
Retract a fact object. |
protected void |
updateDependentTypes(Package newPkg,
TypeDeclaration typeDeclaration)
|
protected void |
updateOTNs(TypeDeclaration type)
|
void |
writeExternal(ObjectOutput stream)
Handles the write serialization of the Package. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Set<EntryPointNode> addedEntryNodeCache
public Set<EntryPointNode> removedEntryNodeCache
| Constructor Detail |
|---|
public ReteooRuleBase()
public ReteooRuleBase(String id)
id - The rete network.
public ReteooRuleBase(String id,
FactHandleFactory factHandleFactory)
factHandleFactory -
public ReteooRuleBase(String id,
RuleBaseConfiguration config)
public ReteooRuleBase(RuleBaseConfiguration config)
config -
public ReteooRuleBase(String id,
RuleBaseConfiguration config,
FactHandleFactory factHandleFactory)
id - The rete network.| Method Detail |
|---|
public void writeExternal(ObjectOutput stream)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class AbstractRuleBaseIOException
public void readExternal(ObjectInput stream)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class AbstractRuleBaseIOException
ClassNotFoundExceptionpublic void registerAddedEntryNodeCache(EntryPointNode node)
public Set<EntryPointNode> getAddedEntryNodeCache()
public void registeRremovedEntryNodeCache(EntryPointNode node)
public Set<EntryPointNode> getRemovedEntryNodeCache()
public Rete getRete()
RuleBase.
public ReteooBuilder getReteooBuilder()
public void assertObject(FactHandle handle,
Object object,
PropagationContext context,
InternalWorkingMemory workingMemory)
throws FactException
handle - The handle.object - The fact.workingMemory - The working-memory.
FactException - If an error occurs while performing the assertion.
public void retractObject(FactHandle handle,
PropagationContext context,
ReteooWorkingMemory workingMemory)
throws FactException
handle - The handle.workingMemory - The working-memory.
FactException - If an error occurs while performing the retraction.protected void updateOTNs(TypeDeclaration type)
updateOTNs in class AbstractRuleBasepublic StatefulSession newStatefulSession(boolean keepReference)
public StatefulSession newStatefulSession(InputStream stream)
public StatefulSession newStatefulSession(InputStream stream,
boolean keepReference)
public StatefulSession newStatefulSession(InputStream stream,
boolean keepReference,
SessionConfiguration conf)
public StatefulSession newStatefulSession(SessionConfiguration sessionConfig,
org.drools.runtime.Environment environment)
RuleBaseWorkingMemory session for this
RuleBase.
sessionConfig - the session configuration object to use for the
created session.
WorkingMemory.WorkingMemory,
org.drools.conflict.DefaultConflictResolverpublic StatelessSession newStatelessSession()
protected void addRule(Rule rule)
throws InvalidPatternException
AbstractRuleBase
addRule in class AbstractRuleBaseInvalidPatternException
protected void addEntryPoint(String id)
throws InvalidPatternException
AbstractRuleBase
addEntryPoint in class AbstractRuleBaseid - the entry point ID
InvalidPatternException
protected void addWindowDeclaration(WindowDeclaration window)
throws InvalidPatternException
AbstractRuleBase
addWindowDeclaration in class AbstractRuleBaseInvalidPatternExceptionprotected void removeRule(Rule rule)
AbstractRuleBasebefore-rule-removed
event is fired, and before the rule is physically removed from the package.
This method is called with the rulebase lock held.
removeRule in class AbstractRuleBasepublic int getNodeCount()
public void addPackages(Package[] pkgs)
public void addPackages(Collection<Package> pkgs)
AbstractRuleBasePackage to the network. Iterates through the
Package adding Each individual Rule to the
network. Before update network each referenced WorkingMemory
is locked.
addPackages in class AbstractRuleBasepkgs - The package to add.public void addPackage(Package newPkg)
protected void updateDependentTypes(Package newPkg,
TypeDeclaration typeDeclaration)
updateDependentTypes in class AbstractRuleBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||