|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.common.BaseNode
org.drools.reteoo.ObjectSource
org.drools.reteoo.Rete
public class Rete
The Rete-OO network.
The Rete class is the root Object. All objects are asserted into
the Rete node where it propagates to all matching ObjectTypeNodes.
The first time an instance of a Class type is asserted it does a full
iteration of all ObjectTyppeNodes looking for matches, any matches are
then cached in a HashMap which is used for future assertions.
While Rete extends ObjectSource nad implements ObjectSink it nulls the
methods attach(), remove() and updateNewNode() as this is the root node
they are no applicable
ObjectTypeNode,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.drools.reteoo.ObjectSource |
|---|
objectSource, sink |
| Fields inherited from class org.drools.common.BaseNode |
|---|
hasMemory, id, sharedCount |
| Constructor Summary | |
|---|---|
Rete()
|
|
| Method Summary | |
|---|---|
protected void |
addObjectSink(ObjectSink objectSink)
Adds the TupleSink so that it may receive
Tuples propagated from this TupleSource. |
void |
assertObject(InternalFactHandle handle,
PropagationContext context,
InternalWorkingMemory workingMemory)
This is the entry point into the network for all asserted Facts. |
void |
attach()
Attaches the node into the network. |
void |
attach(InternalWorkingMemory[] workingMemories)
|
Object |
createMemory(RuleBaseConfiguration config)
|
boolean |
equals(Object object)
|
ObjectHashMap |
getObjectTypeNodes()
|
int |
hashCode()
The hashCode return is simply the unique id of the node. |
void |
remove(BaseNode node,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
protected void |
removeObjectSink(ObjectSink objectSink)
Removes the ObjectSink |
void |
retractObject(InternalFactHandle handle,
PropagationContext context,
InternalWorkingMemory workingMemory)
Retract a fact object from this RuleBase and the specified
WorkingMemory. |
void |
updateSink(ObjectSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
| Methods inherited from class org.drools.reteoo.ObjectSource |
|---|
getSinkPropagator |
| Methods inherited from class org.drools.common.BaseNode |
|---|
addShare, getId, getSharedCount, hasMemory, isInUse, isShared, removeShare, setHasMemory, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.drools.common.NodeMemory |
|---|
getId |
| Constructor Detail |
|---|
public Rete()
| Method Detail |
|---|
public void assertObject(InternalFactHandle handle, PropagationContext context, InternalWorkingMemory workingMemory)
ObjectTypdeNodes asserting the Fact. If the cache does not
exist it first iteraes and builds the cache.
assertObject in interface ObjectSinkhandle - The FactHandle of the fact to assertcontext - The PropagationContext of the WorkingMemory actionworkingMemory - The working memory session.public void retractObject(InternalFactHandle handle, PropagationContext context, InternalWorkingMemory workingMemory)
RuleBase and the specified
WorkingMemory.
retractObject in interface ObjectSinkhandle - The handle of the fact to retract.workingMemory - The working memory session.context - The PropagationContext of the WorkingMemory action.protected void addObjectSink(ObjectSink objectSink)
TupleSink so that it may receive
Tuples propagated from this TupleSource.
addObjectSink in class ObjectSourcetupleSink - The TupleSink to receive propagated
Tuples.protected void removeObjectSink(ObjectSink objectSink)
ObjectSourceObjectSink
removeObjectSink in class ObjectSourceobjectSink - The ObjectSink to removepublic void attach()
BaseNodeObjectSource or TupleSource
public void attach(InternalWorkingMemory[] workingMemories)
public void remove(BaseNode node, InternalWorkingMemory[] workingMemories)
BaseNodeObjectSource or TupleSource
public ObjectHashMap getObjectTypeNodes()
public Object createMemory(RuleBaseConfiguration config)
createMemory in interface NodeMemorypublic int hashCode()
BaseNode
public boolean equals(Object object)
public void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
updateSink in class ObjectSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||