|
||||||||||
| 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.RuleTerminalNode
public class RuleTerminalNode
Leaf Rete-OO node responsible for enacting Action s on a
matched Rule.
Rule,
Serialized Form| Nested Class Summary | |
|---|---|
static class |
RuleTerminalNode.RTNCleanupAdapter
|
static class |
RuleTerminalNode.SortDeclarations
|
| Field Summary |
|---|
| Fields inherited from class org.drools.common.BaseNode |
|---|
associations, id, partitionId, partitionsEnabled |
| Constructor Summary | |
|---|---|
RuleTerminalNode()
|
|
RuleTerminalNode(int id,
LeftTupleSource source,
Rule rule,
GroupElement subrule,
int subruleIndex,
BuildContext context)
|
|
| Method Summary | |
|---|---|
void |
assertLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
Assert a new ReteTuple. |
void |
attach()
Attaches the node into the network. |
void |
attach(InternalWorkingMemory[] workingMemories)
|
LeftTuple |
createLeftTuple(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink)
|
static void |
doInitDeclaredMask(TerminalNode tn,
BuildContext context)
|
static void |
doInitInferredMask(TerminalNode tn)
|
protected void |
doRemove(RuleRemovalContext context,
ReteooBuilder builder,
BaseNode node,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
boolean |
equals(Object object)
|
Declaration[] |
getDeclarations()
|
long |
getDeclaredMask()
|
long |
getInferredMask()
|
int |
getLeftInputOtnId()
|
LeftTupleSource |
getLeftTupleSource()
|
long |
getNegativeMask()
|
LeftTupleSinkNode |
getNextLeftTupleSinkNode()
Returns the next node |
protected ObjectTypeNode |
getObjectTypeNode()
|
LeftTupleSinkNode |
getPreviousLeftTupleSinkNode()
Returns the previous node |
Rule |
getRule()
Retrieve the Action associated with this node. |
int |
getSequence()
|
GroupElement |
getSubRule()
|
short |
getType()
|
int |
hashCode()
The hashCode return is simply the unique id of the node. |
void |
initDeclaredMask(BuildContext context)
|
void |
initInferredMask()
|
boolean |
isFireDirect()
|
boolean |
isInUse()
Returns true in case the current node is in use (is referenced by any other node) |
boolean |
isLeftTupleMemoryEnabled()
|
void |
modifyLeftTuple(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
modifyLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
networkUpdated(UpdateContext updateContext)
A method that is called for all nodes whose network below them changed, after the change is complete, providing them with an oportunity for state update |
void |
readExternal(ObjectInput in)
|
void |
retractLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
setDeclaredMask(long mask)
|
void |
setFireDirect(boolean fireDirect)
|
void |
setInferredMask(long mask)
|
void |
setLeftInputOtnId(int leftInputOtnId)
|
void |
setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
|
void |
setNegativeMask(long mask)
|
void |
setNextLeftTupleSinkNode(LeftTupleSinkNode next)
Sets the next node |
void |
setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
Sets the previous node |
void |
setSequence(int seq)
|
String |
toString()
|
LeftTupleSource |
unwrapTupleSource()
|
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class org.drools.common.BaseNode |
|---|
addAssociation, getAssociations, getId, getPartitionId, remove, removeAssociation, setPartitionId |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.drools.common.NetworkNode |
|---|
getId, getPartitionId |
| Constructor Detail |
|---|
public RuleTerminalNode()
public RuleTerminalNode(int id,
LeftTupleSource source,
Rule rule,
GroupElement subrule,
int subruleIndex,
BuildContext context)
id - source - rule - subrule - subruleIndex - context - | Method Detail |
|---|
public void initDeclaredMask(BuildContext context)
public static void doInitDeclaredMask(TerminalNode tn,
BuildContext context)
public void initInferredMask()
initInferredMask in interface TerminalNodepublic static void doInitInferredMask(TerminalNode tn)
public LeftTupleSource unwrapTupleSource()
unwrapTupleSource in interface TerminalNode
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class BaseNodeIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class BaseNodeIOExceptionpublic Rule getRule()
Action associated with this node.
Action associated with this node.public GroupElement getSubRule()
public void setSequence(int seq)
public int getSequence()
public LeftTupleSource getLeftTupleSource()
getLeftTupleSource in interface LeftTupleSinkgetLeftTupleSource in interface TerminalNodepublic long getDeclaredMask()
getDeclaredMask in interface TerminalNodepublic long getInferredMask()
getInferredMask in interface TerminalNodepublic void setDeclaredMask(long mask)
setDeclaredMask in interface TerminalNodepublic void setInferredMask(long mask)
setInferredMask in interface TerminalNodepublic long getNegativeMask()
getNegativeMask in interface TerminalNodepublic void setNegativeMask(long mask)
setNegativeMask in interface TerminalNode
public void assertLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
LeftTupleSinkReteTuple.
assertLeftTuple in interface LeftTupleSinkleftTuple - The ReteTuple to propagate.context - The PropagationContext of the WorkingMemory actionworkingMemory - the WorkingMemory session.
public void modifyLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
modifyLeftTuple in interface LeftTupleSink
public void modifyLeftTuple(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
modifyLeftTuple in interface LeftTupleSink
public void retractLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
retractLeftTuple in interface LeftTupleSinkpublic String toString()
toString in class BaseNodepublic void attach()
BaseNodeObjectSource or TupleSource
attach in class BaseNodepublic void attach(InternalWorkingMemory[] workingMemories)
attach in class BaseNodepublic void networkUpdated(UpdateContext updateContext)
BaseNode
networkUpdated in class BaseNode
protected void doRemove(RuleRemovalContext context,
ReteooBuilder builder,
BaseNode node,
InternalWorkingMemory[] workingMemories)
BaseNodeObjectSource or TupleSource
doRemove in class BaseNodepublic boolean isInUse()
BaseNode
isInUse in class BaseNodepublic boolean isLeftTupleMemoryEnabled()
isLeftTupleMemoryEnabled in interface LeftTupleSinkpublic void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
setLeftTupleMemoryEnabled in interface LeftTupleSinkpublic Declaration[] getDeclarations()
public LeftTupleSinkNode getNextLeftTupleSinkNode()
getNextLeftTupleSinkNode in interface LeftTupleSinkNodepublic void setNextLeftTupleSinkNode(LeftTupleSinkNode next)
setNextLeftTupleSinkNode in interface LeftTupleSinkNodenext - The next TupleSinkNodepublic LeftTupleSinkNode getPreviousLeftTupleSinkNode()
getPreviousLeftTupleSinkNode in interface LeftTupleSinkNodepublic void setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
setPreviousLeftTupleSinkNode in interface LeftTupleSinkNodeprevious - The previous TupleSinkNodepublic int hashCode()
BaseNode
hashCode in class BaseNodepublic boolean equals(Object object)
equals in class Objectpublic short getType()
getType in interface LeftTupleSink
public LeftTuple createLeftTuple(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
createLeftTuple in interface LeftTupleSink
public LeftTuple createLeftTuple(LeftTuple leftTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
createLeftTuple in interface LeftTupleSink
public LeftTuple createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink)
createLeftTuple in interface LeftTupleSink
public LeftTuple createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
createLeftTuple in interface LeftTupleSinkpublic int getLeftInputOtnId()
getLeftInputOtnId in interface LeftTupleSinkpublic void setLeftInputOtnId(int leftInputOtnId)
setLeftInputOtnId in interface LeftTupleSinkpublic boolean isFireDirect()
public void setFireDirect(boolean fireDirect)
protected ObjectTypeNode getObjectTypeNode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||