Package org.drools.core.reteoo
Class QueryTerminalNode
- java.lang.Object
-
- org.drools.core.common.BaseNode
-
- org.drools.core.reteoo.AbstractTerminalNode
-
- org.drools.core.reteoo.QueryTerminalNode
-
- All Implemented Interfaces:
Externalizable,Serializable,MemoryFactory<PathMemory>,NetworkNode,LeftTupleNode,LeftTupleSink,LeftTupleSinkNode,PathEndNode,Sink,TerminalNode
public class QueryTerminalNode extends AbstractTerminalNode implements LeftTupleSinkNode
Leaf Rete-OO node responsible for enactingActions on a matchedRule.- See Also:
Rule, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.core.reteoo.PathEndNode
PathEndNode.PathMemSpec
-
-
Field Summary
Fields Modifier and Type Field Description protected QueryImplqueryThe rule to invoke upon match.static shorttype-
Fields inherited from class org.drools.core.common.BaseNode
associations, hashcode, id, memoryId, partitionId, partitionsEnabled
-
-
Constructor Summary
Constructors Constructor Description QueryTerminalNode()QueryTerminalNode(int id, LeftTupleSource source, RuleImpl rule, GroupElement subrule, int subruleIndex, BuildContext context)Constructor
-
Method Summary
-
Methods inherited from class org.drools.core.reteoo.AbstractTerminalNode
createMemory, doRemove, getDeclaredMask, getInferredMask, getLeftInferredMask, getLeftTupleSource, getNegativeMask, getObjectCount, getObjectTypeNode, getPathEndNodes, getPathIndex, getPathMemSpec, getPathNodes, getPathNodes, getSinkPropagator, hasPathNode, initDeclaredMask, initInferredMask, initPathMemory, isInUse, isLeftTupleMemoryEnabled, isTerminalNodeOf, networkUpdated, resetPathMemSpec, setDeclaredMask, setInferredMask, setLeftTupleMemoryEnabled, setNegativeMask, setObjectCount, setPartitionIdWithSinks, setPathEndNodes, unwrapTupleSource
-
Methods inherited from class org.drools.core.common.BaseNode
addAssociation, addAssociation, attach, getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionId, setPartitionsEnabled, setStreamMode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleNode
getObjectCount, getPathIndex, getSinkPropagator, setObjectCount
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleSink
getLeftInferredMask, isLeftTupleMemoryEnabled, setLeftTupleMemoryEnabled, setPartitionIdWithSinks
-
Methods inherited from interface org.drools.core.common.MemoryFactory
getMemoryId
-
Methods inherited from interface org.drools.core.common.NetworkNode
getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, isAssociatedWith
-
Methods inherited from interface org.drools.core.reteoo.PathEndNode
calculatePathMemSpec, calculatePathMemSpec
-
-
-
-
Field Detail
-
type
public static final short type
- See Also:
- Constant Field Values
-
query
protected QueryImpl query
The rule to invoke upon match.
-
-
Constructor Detail
-
QueryTerminalNode
public QueryTerminalNode()
-
QueryTerminalNode
public QueryTerminalNode(int id, LeftTupleSource source, RuleImpl rule, GroupElement subrule, int subruleIndex, BuildContext context)Constructor- Parameters:
id- node IDsource- the tuple source for this noderule- the rule this node belongs tosubrule- the subrule this node belongs tocontext- the current build context
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classAbstractTerminalNode- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classAbstractTerminalNode- Throws:
IOException
-
getQuery
public QueryImpl getQuery()
-
getRule
public RuleImpl getRule()
- Specified by:
getRulein interfaceTerminalNode- Specified by:
getRulein classAbstractTerminalNode
-
getSubRule
public GroupElement getSubRule()
- Specified by:
getSubRulein interfaceTerminalNode- Returns:
- the subrule
-
isFireDirect
public boolean isFireDirect()
- Specified by:
isFireDirectin interfaceTerminalNode
-
getAllDeclarations
public Declaration[] getAllDeclarations()
- Specified by:
getAllDeclarationsin interfaceTerminalNode
-
getRequiredDeclarations
public Declaration[] getRequiredDeclarations()
- Specified by:
getRequiredDeclarationsin interfaceTerminalNode
-
getSubruleIndex
public int getSubruleIndex()
-
getPreviousLeftTupleSinkNode
public LeftTupleSinkNode getPreviousLeftTupleSinkNode()
Returns the previous node- Specified by:
getPreviousLeftTupleSinkNodein interfaceLeftTupleSinkNode- Returns:
- The previous TupleSinkNode
-
setPreviousLeftTupleSinkNode
public void setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
Sets the previous node- Specified by:
setPreviousLeftTupleSinkNodein interfaceLeftTupleSinkNode- Parameters:
previous- The previous TupleSinkNode
-
getNextLeftTupleSinkNode
public LeftTupleSinkNode getNextLeftTupleSinkNode()
Returns the next node- Specified by:
getNextLeftTupleSinkNodein interfaceLeftTupleSinkNode- Returns:
- The next TupleSinkNode
-
setNextLeftTupleSinkNode
public void setNextLeftTupleSinkNode(LeftTupleSinkNode next)
Sets the next node- Specified by:
setNextLeftTupleSinkNodein interfaceLeftTupleSinkNode- Parameters:
next- The next TupleSinkNode
-
getType
public short getType()
- Specified by:
getTypein interfaceNetworkNode
-
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle, boolean leftTupleMemoryEnabled)
- Specified by:
createLeftTuplein interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle, LeftTuple leftTuple, Sink sink)
- Specified by:
createLeftTuplein interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled)
- Specified by:
createLeftTuplein interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, Sink sink)
- Specified by:
createLeftTuplein interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, Sink sink, boolean leftTupleMemoryEnabled)
- Specified by:
createLeftTuplein interfaceLeftTupleSink
-
getLeftInputOtnId
public ObjectTypeNode.Id getLeftInputOtnId()
- Specified by:
getLeftInputOtnIdin interfaceLeftTupleSink
-
setLeftInputOtnId
public void setLeftInputOtnId(ObjectTypeNode.Id leftInputOtnId)
- Specified by:
setLeftInputOtnIdin interfaceLeftTupleSink
-
createPeer
public LeftTuple createPeer(LeftTuple original)
- Specified by:
createPeerin interfaceLeftTupleSink- Overrides:
createPeerin classAbstractTerminalNode
-
getSalienceDeclarations
public Declaration[] getSalienceDeclarations()
- Specified by:
getSalienceDeclarationsin interfaceTerminalNode
-
doAttach
public void doAttach(BuildContext context)
-
-