Package org.drools.core.reteoo
Class EvalConditionNode
- java.lang.Object
-
- org.drools.core.common.BaseNode
-
- org.drools.core.reteoo.LeftTupleSource
-
- org.drools.core.reteoo.EvalConditionNode
-
- All Implemented Interfaces:
MemoryFactory<EvalConditionNode.EvalMemory>,NetworkNode,LeftTupleNode,LeftTupleSink,LeftTupleSinkNode,Sink
public class EvalConditionNode extends LeftTupleSource implements LeftTupleSinkNode, MemoryFactory<EvalConditionNode.EvalMemory>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEvalConditionNode.EvalMemorystatic classEvalConditionNode.RuleKey
-
Field Summary
Fields Modifier and Type Field Description protected EvalConditionconditionThe semanticTest.protected booleantupleMemoryEnabled-
Fields inherited from class org.drools.core.reteoo.LeftTupleSource
leftDeclaredMask, leftInferredMask, leftInput, leftNegativeMask, sink
-
Fields inherited from class org.drools.core.common.BaseNode
associations, hashcode, id, memoryId, partitionId, partitionsEnabled
-
-
Constructor Summary
Constructors Constructor Description EvalConditionNode()EvalConditionNode(int id, LeftTupleSource tupleSource, EvalCondition eval, BuildContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAssociation(BuildContext context, org.kie.api.definition.rule.Rule rule)LeftTuplecreateLeftTuple(InternalFactHandle factHandle, boolean leftTupleMemoryEnabled)LeftTuplecreateLeftTuple(InternalFactHandle factHandle, LeftTuple leftTuple, Sink sink)LeftTuplecreateLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, Sink sink, boolean leftTupleMemoryEnabled)LeftTuplecreateLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, Sink sink)LeftTuplecreateLeftTuple(LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled)EvalConditionNode.EvalMemorycreateMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator)LeftTuplecreatePeer(LeftTuple original)voiddoAttach(BuildContext context)protected booleandoRemove(RuleRemovalContext context, ReteooBuilder builder)Removes the node from the network.booleanequals(java.lang.Object object)EvalConditiongetCondition()Retrieve theTestassociated with this node.LeftTupleSinkNodegetNextLeftTupleSinkNode()Returns the next nodeObjectTypeNodegetObjectTypeNode()LeftTupleSinkNodegetPreviousLeftTupleSinkNode()Returns the previous nodeshortgetType()protected voidinitInferredMask(LeftTupleSource leftInput)booleanisLeftTupleMemoryEnabled()voidnetworkUpdated(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 updatebooleanremoveAssociation(org.kie.api.definition.rule.Rule rule, RuleRemovalContext context)Removes the association to the given rule from the associations map.voidsetNextLeftTupleSinkNode(LeftTupleSinkNode next)Sets the next nodevoidsetPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)Sets the previous nodejava.lang.StringtoString()Produce a debug string.-
Methods inherited from class org.drools.core.reteoo.LeftTupleSource
addTupleSink, addTupleSink, addTupleSink, getFirstLeftTupleSinkIgnoreRemoving, getLeftDeclaredMask, getLeftInferredMask, getLeftInputOtnId, getLeftInputPattern, getLeftNegativeMask, getLeftTupleSource, getObjectCount, getObjectType, getObjectTypeForPropertyReactivity, getPathIndex, getSinkPropagator, initDeclaredMask, initMasks, isInUse, removeTupleSink, setLeftInferredMask, setLeftInputOtnId, setLeftListenedProperties, setLeftTupleSource, setNodeConstraintsPropertyReactiveMask, setObjectCount, setPartitionIdWithSinks, setSourcePartitionId, setSourcePartitionId
-
Methods inherited from class org.drools.core.common.BaseNode
addAssociatedTerminal, addAssociation, attach, getAssociatedRules, getAssociatedTerminalsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hasAssociatedTerminal, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociatedTerminal, 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
getLeftTupleSource, getObjectCount, getPathIndex, getSinkPropagator, setObjectCount
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleSink
getLeftInferredMask, getLeftInputOtnId, setLeftInputOtnId, setPartitionIdWithSinks
-
Methods inherited from interface org.drools.core.common.MemoryFactory
getMemoryId
-
Methods inherited from interface org.drools.core.common.NetworkNode
addAssociatedTerminal, getAssociatedRules, getAssociatedTerminalsSize, getId, getPartitionId, getSinks, hasAssociatedTerminal, isAssociatedWith, removeAssociatedTerminal
-
-
-
-
Field Detail
-
condition
protected EvalCondition condition
The semanticTest.
-
tupleMemoryEnabled
protected boolean tupleMemoryEnabled
-
-
Constructor Detail
-
EvalConditionNode
public EvalConditionNode()
-
EvalConditionNode
public EvalConditionNode(int id, LeftTupleSource tupleSource, EvalCondition eval, BuildContext context)
-
-
Method Detail
-
doAttach
public void doAttach(BuildContext context)
-
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
-
initInferredMask
protected void initInferredMask(LeftTupleSource leftInput)
- Overrides:
initInferredMaskin classLeftTupleSource
-
getCondition
public EvalCondition getCondition()
Retrieve theTestassociated with this node.- Returns:
- The
Test.
-
toString
public java.lang.String toString()
Produce a debug string.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
createMemory
public EvalConditionNode.EvalMemory createMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator)
- Specified by:
createMemoryin interfaceMemoryFactory<EvalConditionNode.EvalMemory>
-
createPeer
public LeftTuple createPeer(LeftTuple original)
- Specified by:
createPeerin interfaceLeftTupleSink- Specified by:
createPeerin classLeftTupleSource
-
isLeftTupleMemoryEnabled
public boolean isLeftTupleMemoryEnabled()
- Specified by:
isLeftTupleMemoryEnabledin interfaceLeftTupleSink- Specified by:
isLeftTupleMemoryEnabledin classLeftTupleSource
-
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
-
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
-
getType
public short getType()
- Specified by:
getTypein interfaceNetworkNode- Specified by:
getTypein classLeftTupleSource
-
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
-
getObjectTypeNode
public ObjectTypeNode getObjectTypeNode()
- Specified by:
getObjectTypeNodein classBaseNode
-
doRemove
protected boolean doRemove(RuleRemovalContext context, ReteooBuilder builder)
Description copied from class:BaseNodeRemoves the node from the network. Usually from the parentObjectSourceorTupleSource
-
addAssociation
public void addAssociation(BuildContext context, org.kie.api.definition.rule.Rule rule)
- Overrides:
addAssociationin classBaseNode
-
removeAssociation
public boolean removeAssociation(org.kie.api.definition.rule.Rule rule, RuleRemovalContext context)Description copied from class:BaseNodeRemoves the association to the given rule from the associations map.- Overrides:
removeAssociationin classBaseNode
-
-