Package org.drools.core.reteoo
Class AbstractTerminalNode
- java.lang.Object
-
- org.drools.core.common.BaseNode
-
- org.drools.core.reteoo.AbstractTerminalNode
-
- All Implemented Interfaces:
MemoryFactory<PathMemory>,NetworkNode,LeftTupleNode,LeftTupleSink,LeftTupleSinkNode,PathEndNode,Sink,TerminalNode
- Direct Known Subclasses:
QueryTerminalNode,RuleTerminalNode
public abstract class AbstractTerminalNode extends BaseNode implements TerminalNode
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.core.reteoo.PathEndNode
PathEndNode.PathMemSpec
-
-
Field Summary
-
Fields inherited from class org.drools.core.common.BaseNode
associations, hashcode, id, memoryId, partitionId, partitionsEnabled
-
-
Constructor Summary
Constructors Constructor Description AbstractTerminalNode()AbstractTerminalNode(int id, RuleBasePartitionId partitionId, boolean partitionsEnabled, LeftTupleSource source, BuildContext context)
-
Method Summary
-
Methods inherited from class org.drools.core.common.BaseNode
addAssociation, addAssociation, attach, doAttach, getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionId, setPartitionsEnabled, setStreamMode, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleSink
createLeftTuple, createLeftTuple, createLeftTuple, createLeftTuple, createLeftTuple, getLeftInputOtnId, setLeftInputOtnId
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleSinkNode
getNextLeftTupleSinkNode, getPreviousLeftTupleSinkNode, setNextLeftTupleSinkNode, setPreviousLeftTupleSinkNode
-
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, getType, isAssociatedWith
-
Methods inherited from interface org.drools.core.reteoo.PathEndNode
calculatePathMemSpec, calculatePathMemSpec
-
Methods inherited from interface org.drools.core.reteoo.TerminalNode
getAllDeclarations, getRequiredDeclarations, getSalienceDeclarations, getSubRule, isFireDirect
-
-
-
-
Constructor Detail
-
AbstractTerminalNode
public AbstractTerminalNode()
-
AbstractTerminalNode
public AbstractTerminalNode(int id, RuleBasePartitionId partitionId, boolean partitionsEnabled, LeftTupleSource source, BuildContext context)
-
-
Method Detail
-
getPathMemSpec
public PathEndNode.PathMemSpec getPathMemSpec()
- Specified by:
getPathMemSpecin interfacePathEndNode
-
resetPathMemSpec
public void resetPathMemSpec(TerminalNode removingTN)
- Specified by:
resetPathMemSpecin interfacePathEndNode
-
setPathEndNodes
public void setPathEndNodes(PathEndNode[] pathEndNodes)
- Specified by:
setPathEndNodesin interfacePathEndNode
-
getPathEndNodes
public PathEndNode[] getPathEndNodes()
- Specified by:
getPathEndNodesin interfacePathEndNode
-
getPathIndex
public int getPathIndex()
- Specified by:
getPathIndexin interfaceLeftTupleNode
-
getObjectCount
public int getObjectCount()
- Specified by:
getObjectCountin interfaceLeftTupleNode
-
setObjectCount
public void setObjectCount(int count)
- Specified by:
setObjectCountin interfaceLeftTupleNode
-
initDeclaredMask
protected void initDeclaredMask(BuildContext context)
-
initInferredMask
public void initInferredMask()
- Specified by:
initInferredMaskin interfaceTerminalNode
-
unwrapTupleSource
public LeftTupleSource unwrapTupleSource()
- Specified by:
unwrapTupleSourcein interfaceTerminalNode
-
getRule
public abstract RuleImpl getRule()
- Specified by:
getRulein interfaceTerminalNode
-
createMemory
public PathMemory createMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator)
- Specified by:
createMemoryin interfaceMemoryFactory<PathMemory>
-
initPathMemory
public static PathMemory initPathMemory(PathEndNode pathEndNode, PathMemory pmem)
-
createPeer
public LeftTuple createPeer(LeftTuple original)
- Specified by:
createPeerin interfaceLeftTupleSink
-
doRemove
protected boolean doRemove(RuleRemovalContext context, ReteooBuilder builder)
Description copied from class:BaseNodeRemoves the node from the network. Usually from the parentObjectSourceorTupleSource
-
getLeftTupleSource
public LeftTupleSource getLeftTupleSource()
- Specified by:
getLeftTupleSourcein interfaceLeftTupleNode- Specified by:
getLeftTupleSourcein interfaceTerminalNode
-
getDeclaredMask
public BitMask getDeclaredMask()
- Specified by:
getDeclaredMaskin interfaceTerminalNode
-
getInferredMask
public BitMask getInferredMask()
- Specified by:
getInferredMaskin interfaceTerminalNode
-
getLeftInferredMask
public BitMask getLeftInferredMask()
- Specified by:
getLeftInferredMaskin interfaceLeftTupleSink
-
setDeclaredMask
public void setDeclaredMask(BitMask mask)
- Specified by:
setDeclaredMaskin interfaceTerminalNode
-
setInferredMask
public void setInferredMask(BitMask mask)
- Specified by:
setInferredMaskin interfaceTerminalNode
-
getNegativeMask
public BitMask getNegativeMask()
- Specified by:
getNegativeMaskin interfaceTerminalNode
-
setNegativeMask
public void setNegativeMask(BitMask mask)
- Specified by:
setNegativeMaskin interfaceTerminalNode
-
networkUpdated
public void networkUpdated(UpdateContext updateContext)
Description copied from class:BaseNodeA method that is called for all nodes whose network below them changed, after the change is complete, providing them with an opportunity for state update- Specified by:
networkUpdatedin classBaseNode
-
isInUse
public boolean isInUse()
Description copied from class:BaseNodeReturns true in case the current node is in use (is referenced by any other node)
-
isLeftTupleMemoryEnabled
public boolean isLeftTupleMemoryEnabled()
- Specified by:
isLeftTupleMemoryEnabledin interfaceLeftTupleSink
-
setLeftTupleMemoryEnabled
public void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
- Specified by:
setLeftTupleMemoryEnabledin interfaceLeftTupleSink
-
getPathNodes
public static LeftTupleNode[] getPathNodes(PathEndNode endNode)
-
getPathNodes
public LeftTupleNode[] getPathNodes()
- Specified by:
getPathNodesin interfacePathEndNode
-
hasPathNode
public final boolean hasPathNode(LeftTupleNode node)
- Specified by:
hasPathNodein interfacePathEndNode
-
isTerminalNodeOf
public final boolean isTerminalNodeOf(LeftTupleNode node)
- Specified by:
isTerminalNodeOfin interfaceTerminalNode
-
getSinkPropagator
public LeftTupleSinkPropagator getSinkPropagator()
- Specified by:
getSinkPropagatorin interfaceLeftTupleNode
-
setPartitionIdWithSinks
public final void setPartitionIdWithSinks(RuleBasePartitionId partitionId)
- Specified by:
setPartitionIdWithSinksin interfaceLeftTupleSink
-
getObjectTypeNode
public ObjectTypeNode getObjectTypeNode()
- Specified by:
getObjectTypeNodein classBaseNode
-
-