Package org.drools.core.reteoo
Class AbstractTerminalNode
java.lang.Object
org.drools.core.common.BaseNode
org.drools.core.reteoo.AbstractTerminalNode
- All Implemented Interfaces:
Serializable,NetworkNode,BaseTerminalNode,MemoryFactory<PathMemory>,LeftTupleNode,LeftTupleSink,LeftTupleSinkNode,PathEndNode,Sink,TerminalNode
- Direct Known Subclasses:
QueryTerminalNode,RuleTerminalNode
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.drools.core.reteoo.PathEndNode
PathEndNode.PathMemSpec -
Field Summary
FieldsFields inherited from class org.drools.core.common.BaseNode
associations, hashcode, id, memoryId, partitionId -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTerminalNode(int id, RuleBasePartitionId partitionId, LeftTupleSource source, BuildContext context, RuleImpl rule, GroupElement subrule, int subruleIndex) -
Method Summary
Modifier and TypeMethodDescriptionprotected intcreateMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator) protected booleandoRemove(RuleRemovalContext context, ReteooBuilder builder) Removes the node from the network.booleanorg.drools.util.bitmask.BitMaskorg.drools.util.bitmask.BitMaskorg.drools.util.bitmask.BitMaskorg.drools.util.bitmask.BitMaskReturns the next nodeintintgetPathMemSpec(TerminalNode removingTN) static LeftTupleNode[]getPathNodes(PathEndNode endNode) Returns the previous nodegetRule()intfinal booleanhasPathNode(LeftTupleNode node) protected voidinitDeclaredMask(BuildContext context) voidstatic PathMemoryinitPathMemory(PathEndNode pathEndNode, PathMemory pmem) booleanisInUse()Returns true in case the current node is in use (is referenced by any other node)booleanvoidnetworkUpdated(UpdateContext updateContext) A method that is called for all nodes whose network below them changed, after the change is complete, providing them with an opportunity for state updatevoidvoidresetPathMemSpec(TerminalNode removingTN) voidsetDeclaredMask(org.drools.util.bitmask.BitMask mask) voidsetEagerSegmentPrototypes(SegmentMemory.SegmentPrototype[] eagerSegmentPrototypes) voidsetInferredMask(org.drools.util.bitmask.BitMask mask) voidsetNegativeMask(org.drools.util.bitmask.BitMask mask) voidSets the next nodevoidsetObjectCount(int count) final voidsetPartitionIdWithSinks(RuleBasePartitionId partitionId) voidsetPathEndNodes(PathEndNode[] pathEndNodes) voidsetPathMemSpec(PathEndNode.PathMemSpec pathMemSpec) voidSets the previous nodevoidvoidMethods inherited from class org.drools.core.common.BaseNode
addAssociatedTerminal, addAssociation, addAssociation, attach, doAttach, getAssociatedRules, getAssociatedTerminalsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hasAssociatedTerminal, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociatedTerminal, removeAssociation, setId, setPartitionId, setStreamMode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.base.reteoo.BaseTerminalNode
getSalienceDeclarations, isFireDirectMethods inherited from interface org.drools.core.reteoo.LeftTupleSink
getLeftInputOtnId, setLeftInputOtnIdMethods inherited from interface org.drools.core.common.MemoryFactory
getMemoryIdMethods inherited from interface org.drools.base.common.NetworkNode
addAssociatedTerminal, getAssociatedRules, getAssociatedTerminalsSize, getId, getPartitionId, getSinks, getType, hasAssociatedTerminal, isAssociatedWith, isRightInputIsRiaNode, removeAssociatedTerminalMethods inherited from interface org.drools.core.reteoo.PathEndNode
calculatePathMemSpec
-
Field Details
-
requiredDeclarations
-
pathMemSpec
-
-
Constructor Details
-
AbstractTerminalNode
public AbstractTerminalNode() -
AbstractTerminalNode
public AbstractTerminalNode(int id, RuleBasePartitionId partitionId, LeftTupleSource source, BuildContext context, RuleImpl rule, GroupElement subrule, int subruleIndex)
-
-
Method Details
-
getPathMemSpec
- Specified by:
getPathMemSpecin interfacePathEndNode
-
setPathMemSpec
- Specified by:
setPathMemSpecin interfacePathEndNode
-
getPathMemSpec
- Specified by:
getPathMemSpecin interfacePathEndNode
-
resetPathMemSpec
- Specified by:
resetPathMemSpecin interfacePathEndNode
-
getRule
- Specified by:
getRulein interfaceBaseTerminalNode
-
getSubRule
- Specified by:
getSubRulein interfaceBaseTerminalNode
-
getSubruleIndex
public int getSubruleIndex()- Specified by:
getSubruleIndexin interfaceBaseTerminalNode
-
getAllDeclarations
- Specified by:
getAllDeclarationsin interfaceBaseTerminalNode
-
getRequiredDeclarations
- Specified by:
getRequiredDeclarationsin interfaceBaseTerminalNode
-
getStartTupleSource
- Specified by:
getStartTupleSourcein interfacePathEndNode
-
nullPathMemSpec
public void nullPathMemSpec()- Specified by:
nullPathMemSpecin interfacePathEndNode
-
setPathEndNodes
- Specified by:
setPathEndNodesin interfacePathEndNode
-
getPathEndNodes
- Specified by:
getPathEndNodesin interfacePathEndNode
-
setSegmentPrototypes
- Specified by:
setSegmentPrototypesin interfacePathEndNode
-
getSegmentPrototypes
- Specified by:
getSegmentPrototypesin interfacePathEndNode
-
getEagerSegmentPrototypes
- Specified by:
getEagerSegmentPrototypesin interfacePathEndNode
-
setEagerSegmentPrototypes
- Specified by:
setEagerSegmentPrototypesin 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
-
initInferredMask
public void initInferredMask()- Specified by:
initInferredMaskin interfaceBaseTerminalNode
-
unwrapTupleSource
- Specified by:
unwrapTupleSourcein interfaceTerminalNode
-
createMemory
- Specified by:
createMemoryin interfaceMemoryFactory<PathMemory>
-
initPathMemory
-
doRemove
Description copied from class:BaseNodeRemoves the node from the network. Usually from the parentObjectSourceorTupleSource -
getLeftTupleSource
- Specified by:
getLeftTupleSourcein interfaceLeftTupleNode- Specified by:
getLeftTupleSourcein interfaceTerminalNode
-
getDeclaredMask
public org.drools.util.bitmask.BitMask getDeclaredMask()- Specified by:
getDeclaredMaskin interfaceBaseTerminalNode
-
getInferredMask
public org.drools.util.bitmask.BitMask getInferredMask()- Specified by:
getInferredMaskin interfaceBaseTerminalNode
-
getLeftInferredMask
public org.drools.util.bitmask.BitMask getLeftInferredMask()- Specified by:
getLeftInferredMaskin interfaceLeftTupleSink
-
setDeclaredMask
public void setDeclaredMask(org.drools.util.bitmask.BitMask mask) - Specified by:
setDeclaredMaskin interfaceBaseTerminalNode
-
setInferredMask
public void setInferredMask(org.drools.util.bitmask.BitMask mask) - Specified by:
setInferredMaskin interfaceBaseTerminalNode
-
getNegativeMask
public org.drools.util.bitmask.BitMask getNegativeMask()- Specified by:
getNegativeMaskin interfaceBaseTerminalNode
-
setNegativeMask
public void setNegativeMask(org.drools.util.bitmask.BitMask mask) - Specified by:
setNegativeMaskin interfaceBaseTerminalNode
-
networkUpdated
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
-
getPathNodes
-
getPathNodes
- Specified by:
getPathNodesin interfacePathEndNode
-
hasPathNode
- Specified by:
hasPathNodein interfacePathEndNode
-
getSinkPropagator
- Specified by:
getSinkPropagatorin interfaceLeftTupleNode
-
setPartitionIdWithSinks
- Specified by:
setPartitionIdWithSinksin interfaceLeftTupleSink
-
getObjectTypeNode
- Specified by:
getObjectTypeNodein classBaseNode
-
getNextLeftTupleSinkNode
Returns the next node- Specified by:
getNextLeftTupleSinkNodein interfaceLeftTupleSinkNode- Returns:
- The next TupleSinkNode
-
setNextLeftTupleSinkNode
Sets the next node- Specified by:
setNextLeftTupleSinkNodein interfaceLeftTupleSinkNode- Parameters:
next- The next TupleSinkNode
-
getPreviousLeftTupleSinkNode
Returns the previous node- Specified by:
getPreviousLeftTupleSinkNodein interfaceLeftTupleSinkNode- Returns:
- The previous TupleSinkNode
-
setPreviousLeftTupleSinkNode
Sets the previous node- Specified by:
setPreviousLeftTupleSinkNodein interfaceLeftTupleSinkNode- Parameters:
previous- The previous TupleSinkNode
-
visitLeftTupleNodes
- Specified by:
visitLeftTupleNodesin interfaceTerminalNode
-
calculateHashCode
protected int calculateHashCode() -
equals
-