Package org.drools.core.reteoo
Class ConditionalBranchNode
java.lang.Object
org.drools.core.common.BaseNode
org.drools.core.reteoo.LeftTupleSource
org.drools.core.reteoo.ConditionalBranchNode
- All Implemented Interfaces:
Serializable,NetworkNode,MemoryFactory<ConditionalBranchNode.ConditionalBranchMemory>,LeftTupleNode,LeftTupleSink,LeftTupleSinkNode,Sink
public class ConditionalBranchNode
extends LeftTupleSource
implements LeftTupleSinkNode, MemoryFactory<ConditionalBranchNode.ConditionalBranchMemory>
Node which allows to follow different paths in the Rete-OO network,
based on the result of a boolean
Test.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.drools.core.reteoo.LeftTupleSource
leftDeclaredMask, leftInferredMask, leftInput, leftNegativeMask, sinkFields inherited from class org.drools.core.common.BaseNode
associations, hashcode, id, memoryId, partitionId -
Constructor Summary
ConstructorsConstructorDescriptionConditionalBranchNode(int id, LeftTupleSource tupleSource, ConditionalBranchEvaluator branchEvaluator, BuildContext context) -
Method Summary
Modifier and TypeMethodDescriptioncreateMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator) voiddoAttach(BuildContext context) protected booleandoRemove(RuleRemovalContext context, ReteooBuilder builder) Removes the node from the network.booleanReturns the next nodeReturns the previous nodeintgetType()protected voidinitDeclaredMask(BuildContext context, LeftTupleSource leftInput) 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 updatevoidSets the next nodevoidSets the previous nodetoString()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, initInferredMask, initMasks, isInUse, removeTupleSink, setLeftInferredMask, setLeftInputOtnId, setLeftListenedProperties, setLeftTupleSource, setNodeConstraintsPropertyReactiveMask, setObjectCount, setPartitionIdWithSinks, setSourcePartitionId, setSourcePartitionIdMethods inherited from class org.drools.core.common.BaseNode
addAssociatedTerminal, addAssociation, addAssociation, attach, getAssociatedRules, getAssociatedTerminalsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hasAssociatedTerminal, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociatedTerminal, removeAssociation, setId, setPartitionId, setStreamModeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.core.reteoo.LeftTupleNode
getLeftTupleSource, getObjectCount, getPathIndex, getSinkPropagator, setObjectCountMethods inherited from interface org.drools.core.reteoo.LeftTupleSink
getLeftInferredMask, getLeftInputOtnId, setLeftInputOtnId, setPartitionIdWithSinksMethods inherited from interface org.drools.core.common.MemoryFactory
getMemoryIdMethods inherited from interface org.drools.base.common.NetworkNode
addAssociatedTerminal, getAssociatedRules, getAssociatedTerminalsSize, getId, getPartitionId, getSinks, hasAssociatedTerminal, isAssociatedWith, isRightInputIsRiaNode, removeAssociatedTerminal
-
Field Details
-
branchEvaluator
-
tupleMemoryEnabled
protected boolean tupleMemoryEnabled
-
-
Constructor Details
-
ConditionalBranchNode
public ConditionalBranchNode() -
ConditionalBranchNode
public ConditionalBranchNode(int id, LeftTupleSource tupleSource, ConditionalBranchEvaluator branchEvaluator, BuildContext context)
-
-
Method Details
-
getBranchEvaluator
-
doAttach
-
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
-
toString
Produce a debug string. -
equals
-
createMemory
public ConditionalBranchNode.ConditionalBranchMemory createMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator) - Specified by:
createMemoryin interfaceMemoryFactory<ConditionalBranchNode.ConditionalBranchMemory>
-
isLeftTupleMemoryEnabled
public boolean isLeftTupleMemoryEnabled()- Specified by:
isLeftTupleMemoryEnabledin interfaceLeftTupleSink- Specified by:
isLeftTupleMemoryEnabledin classLeftTupleSource
-
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
-
getType
public int getType()- Specified by:
getTypein interfaceNetworkNode- Specified by:
getTypein classLeftTupleSource
-
getObjectTypeNode
- Specified by:
getObjectTypeNodein classBaseNode
-
doRemove
Description copied from class:BaseNodeRemoves the node from the network. Usually from the parentObjectSourceorTupleSource -
initDeclaredMask
- Overrides:
initDeclaredMaskin classLeftTupleSource
-