public class RuleTerminalNode extends AbstractTerminalNode
Action s on a
matched Rule.Rule,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
RuleTerminalNode.RTNCleanupAdapter |
static class |
RuleTerminalNode.SortDeclarations |
| Modifier and Type | Field and Description |
|---|---|
protected String |
consequenceName |
protected Declaration[] |
declarations |
protected Declaration[] |
enabledDeclarations |
protected boolean |
fireDirect |
protected ObjectTypeNode.Id |
leftInputOtnId |
protected LeftTupleSinkNode |
nextTupleSinkNode |
protected LeftTupleSinkNode |
previousTupleSinkNode |
protected RuleImpl |
rule
The rule to invoke upon match.
|
protected Declaration[] |
salienceDeclarations |
protected GroupElement |
subrule
the subrule reference is needed to resolve declarations
because declarations may have different offsets in each subrule
|
protected int |
subruleIndex |
protected Declaration[][] |
timerDeclarations |
associations, id, partitionId, partitionsEnabled| Constructor and Description |
|---|
RuleTerminalNode() |
RuleTerminalNode(int id,
LeftTupleSource source,
RuleImpl rule,
GroupElement subrule,
int subruleIndex,
BuildContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
Assert a new
ReteTuple. |
void |
attach(BuildContext context)
Attaches the node into the network.
|
void |
cancelMatch(AgendaItem match,
InternalWorkingMemoryActions workingMemory) |
LeftTuple |
createLeftTuple(InternalFactHandle factHandle,
LeftTuple leftTuple,
LeftTupleSink sink) |
LeftTuple |
createLeftTuple(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled) |
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
LeftTupleSink sink,
PropagationContext pctx,
boolean leftTupleMemoryEnabled) |
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled) |
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink) |
boolean |
equals(Object object) |
static PropagationContext |
findMostRecentPropagationContext(LeftTuple leftTuple,
PropagationContext context) |
String |
getConsequenceName() |
Declaration[] |
getDeclarations() |
Declaration[] |
getEnabledDeclarations() |
ObjectTypeNode.Id |
getLeftInputOtnId() |
LeftTupleSinkNode |
getNextLeftTupleSinkNode()
Returns the next node
|
protected ObjectTypeNode |
getObjectTypeNode() |
LeftTupleSinkNode |
getPreviousLeftTupleSinkNode()
Returns the previous node
|
RuleImpl |
getRule()
Retrieve the
Action associated with this node. |
Declaration[] |
getSalienceDeclarations() |
GroupElement |
getSubRule() |
Declaration[][] |
getTimerDeclarations() |
short |
getType() |
int |
hashCode()
The hashCode return is simply the unique id of the node.
|
boolean |
isFireDirect() |
boolean |
isInUse()
Returns true in case the current node is in use (is referenced by any other node)
|
boolean |
isLeftTupleMemoryEnabled() |
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 |
setConsequenceName(String consequenceName) |
void |
setDeclarations(Map<String,Declaration> decls) |
void |
setEnabledDeclarations(Declaration[] enabledDeclarations) |
void |
setFireDirect(boolean fireDirect) |
void |
setLeftInputOtnId(ObjectTypeNode.Id leftInputOtnId) |
void |
setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled) |
void |
setNextLeftTupleSinkNode(LeftTupleSinkNode next)
Sets the next node
|
void |
setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
Sets the previous node
|
void |
setSalienceDeclarations(Declaration[] salienceDeclarations) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
createMemory, createPeer, doRemove, getDeclaredMask, getInferredMask, getLeftInferredMask, getLeftTupleSource, getNegativeMask, initDeclaredMask, initInferredMask, initPathMemory, modifyLeftTuple, setDeclaredMask, setInferredMask, setNegativeMask, unwrapTupleSourceaddAssociation, attach, getAssociations, getId, getPartitionId, isStreamMode, remove, removeAssociation, setId, setPartitionId, setStreamModeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAssociations, getId, getPartitionIdgetIdprotected RuleImpl rule
protected GroupElement subrule
protected int subruleIndex
protected Declaration[] declarations
protected Declaration[][] timerDeclarations
protected Declaration[] salienceDeclarations
protected Declaration[] enabledDeclarations
protected LeftTupleSinkNode previousTupleSinkNode
protected LeftTupleSinkNode nextTupleSinkNode
protected boolean fireDirect
protected transient ObjectTypeNode.Id leftInputOtnId
protected String consequenceName
public RuleTerminalNode()
public RuleTerminalNode(int id,
LeftTupleSource source,
RuleImpl rule,
GroupElement subrule,
int subruleIndex,
BuildContext context)
id - source - rule - subrule - subruleIndex - context - public void setDeclarations(Map<String,Declaration> decls)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class AbstractTerminalNodeIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class AbstractTerminalNodeIOExceptionpublic RuleImpl getRule()
Action associated with this node.getRule in interface TerminalNodegetRule in class AbstractTerminalNodeAction associated with this node.public GroupElement getSubRule()
public static PropagationContext findMostRecentPropagationContext(LeftTuple leftTuple, PropagationContext context)
public void attach(BuildContext context)
BaseNodeObjectSource or TupleSourcepublic void networkUpdated(UpdateContext updateContext)
BaseNodenetworkUpdated in class BaseNodepublic boolean isInUse()
BaseNodepublic boolean isLeftTupleMemoryEnabled()
public void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
public Declaration[] getDeclarations()
public Declaration[][] getTimerDeclarations()
public Declaration[] getSalienceDeclarations()
public void setSalienceDeclarations(Declaration[] salienceDeclarations)
public Declaration[] getEnabledDeclarations()
public void setEnabledDeclarations(Declaration[] enabledDeclarations)
public String getConsequenceName()
public void setConsequenceName(String consequenceName)
public void cancelMatch(AgendaItem match, InternalWorkingMemoryActions workingMemory)
public LeftTupleSinkNode getNextLeftTupleSinkNode()
public void setNextLeftTupleSinkNode(LeftTupleSinkNode next)
next - The next TupleSinkNodepublic LeftTupleSinkNode getPreviousLeftTupleSinkNode()
public void setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
previous - The previous TupleSinkNodepublic int hashCode()
BaseNodepublic short getType()
public LeftTuple createLeftTuple(InternalFactHandle factHandle, LeftTuple leftTuple, LeftTupleSink sink)
public LeftTuple createLeftTuple(InternalFactHandle factHandle, LeftTupleSink sink, boolean leftTupleMemoryEnabled)
public LeftTuple createLeftTuple(LeftTuple leftTuple, LeftTupleSink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled)
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTupleSink sink)
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, LeftTupleSink sink, boolean leftTupleMemoryEnabled)
public ObjectTypeNode.Id getLeftInputOtnId()
public void setLeftInputOtnId(ObjectTypeNode.Id leftInputOtnId)
public boolean isFireDirect()
public void setFireDirect(boolean fireDirect)
protected ObjectTypeNode getObjectTypeNode()
public void assertLeftTuple(LeftTuple leftTuple, PropagationContext context, InternalWorkingMemory workingMemory)
LeftTupleSinkReteTuple.leftTuple - The ReteTuple to propagate.context - The PropagationContext of the WorkingMemory actionworkingMemory - the WorkingMemory session.public void retractLeftTuple(LeftTuple leftTuple, PropagationContext context, InternalWorkingMemory workingMemory)
public void modifyLeftTuple(LeftTuple leftTuple, PropagationContext context, InternalWorkingMemory workingMemory)
Copyright © 2001–2015 JBoss by Red Hat. All rights reserved.