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 enactingAction
s 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 QueryImpl
query
The rule to invoke upon match.static short
type
-
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:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classAbstractTerminalNode
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classAbstractTerminalNode
- Throws:
IOException
-
getQuery
public QueryImpl getQuery()
-
getRule
public RuleImpl getRule()
- Specified by:
getRule
in interfaceTerminalNode
- Specified by:
getRule
in classAbstractTerminalNode
-
getSubRule
public GroupElement getSubRule()
- Specified by:
getSubRule
in interfaceTerminalNode
- Returns:
- the subrule
-
isFireDirect
public boolean isFireDirect()
- Specified by:
isFireDirect
in interfaceTerminalNode
-
getAllDeclarations
public Declaration[] getAllDeclarations()
- Specified by:
getAllDeclarations
in interfaceTerminalNode
-
getRequiredDeclarations
public Declaration[] getRequiredDeclarations()
- Specified by:
getRequiredDeclarations
in interfaceTerminalNode
-
getSubruleIndex
public int getSubruleIndex()
-
getPreviousLeftTupleSinkNode
public LeftTupleSinkNode getPreviousLeftTupleSinkNode()
Returns the previous node- Specified by:
getPreviousLeftTupleSinkNode
in interfaceLeftTupleSinkNode
- Returns:
- The previous TupleSinkNode
-
setPreviousLeftTupleSinkNode
public void setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
Sets the previous node- Specified by:
setPreviousLeftTupleSinkNode
in interfaceLeftTupleSinkNode
- Parameters:
previous
- The previous TupleSinkNode
-
getNextLeftTupleSinkNode
public LeftTupleSinkNode getNextLeftTupleSinkNode()
Returns the next node- Specified by:
getNextLeftTupleSinkNode
in interfaceLeftTupleSinkNode
- Returns:
- The next TupleSinkNode
-
setNextLeftTupleSinkNode
public void setNextLeftTupleSinkNode(LeftTupleSinkNode next)
Sets the next node- Specified by:
setNextLeftTupleSinkNode
in interfaceLeftTupleSinkNode
- Parameters:
next
- The next TupleSinkNode
-
getType
public short getType()
- Specified by:
getType
in interfaceNetworkNode
-
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle, boolean leftTupleMemoryEnabled)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle, LeftTuple leftTuple, Sink sink)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, Sink sink)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, Sink sink, boolean leftTupleMemoryEnabled)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
getLeftInputOtnId
public ObjectTypeNode.Id getLeftInputOtnId()
- Specified by:
getLeftInputOtnId
in interfaceLeftTupleSink
-
setLeftInputOtnId
public void setLeftInputOtnId(ObjectTypeNode.Id leftInputOtnId)
- Specified by:
setLeftInputOtnId
in interfaceLeftTupleSink
-
createPeer
public LeftTuple createPeer(LeftTuple original)
- Specified by:
createPeer
in interfaceLeftTupleSink
- Overrides:
createPeer
in classAbstractTerminalNode
-
getSalienceDeclarations
public Declaration[] getSalienceDeclarations()
- Specified by:
getSalienceDeclarations
in interfaceTerminalNode
-
doAttach
public void doAttach(BuildContext context)
-
-