Package org.drools.core.reteoo
Class RightInputAdapterNode
java.lang.Object
org.drools.core.common.BaseNode
org.drools.core.reteoo.ObjectSource
org.drools.core.reteoo.RightInputAdapterNode
- All Implemented Interfaces:
Serializable,NetworkNode,MemoryFactory<PathMemory>,LeftTupleNode,LeftTupleSink,LeftTupleSinkNode,PathEndNode,Sink
When joining a subnetwork into the main network again, RightInputAdapterNode adapts the
subnetwork's tuple into a fact in order right join it with the tuple being propagated in
the main network.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.drools.core.reteoo.PathEndNode
PathEndNode.PathMemSpec -
Field Summary
Fields inherited from class org.drools.core.reteoo.ObjectSource
alphaNodeHashingThreshold, alphaNodeRangeIndexThreshold, declaredMask, inferredMask, sink, sourceFields inherited from class org.drools.core.common.BaseNode
associations, hashcode, id, memoryId, partitionId -
Constructor Summary
ConstructorsConstructorDescriptionRightInputAdapterNode(int id, LeftTupleSource source, LeftTupleSource startTupleSource, BuildContext context) Constructor specifying the unique id of the node in the Rete network, the position of the propagatingFactHandleImplinReteTupleand the source that propagates the receiveReteTuples. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssociation(BuildContext context, Rule rule) org.drools.util.bitmask.BitMaskcalculateDeclaredMask(Pattern pattern, ObjectType modifiedType, List<String> settableProperties) createMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator) Creates and return the node memoryvoiddoAttach(BuildContext context) protected booleandoRemove(RuleRemovalContext context, ReteooBuilder builder) Removes the node from the network.booleanorg.drools.util.bitmask.BitMaskReturns the next nodeintintgetPathMemSpec(TerminalNode removingTN) used during network build time, potentially during rule removal time.Returns the previous nodeintgetType()booleanhasPathNode(LeftTupleNode 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 updatevoidbooleanremoveAssociation(Rule rule, RuleRemovalContext context) Removes the association to the given rule from the associations map.voidresetPathMemSpec(TerminalNode removingTN) voidsetEagerSegmentPrototypes(SegmentMemory.SegmentPrototype[] eagerSegmentPrototypes) voidsetLeftInputOtnId(ObjectTypeNodeId leftInputOtnId) voidSets the next nodevoidsetObjectCount(int count) voidsetPathEndNodes(PathEndNode[] pathEndNodes) voidsetPathMemSpec(PathEndNode.PathMemSpec pathMemSpec) voidSets the previous nodevoidvoidsetTupleSource(LeftTupleSource tupleSource) toString()voidupdateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory wm) Methods inherited from class org.drools.core.reteoo.ObjectSource
addObjectSink, getDeclaredMask, getObjectSinkPropagator, getObjectTypeNode, getParentObjectSource, getRuleBase, initDeclaredMask, isInUse, removeObjectSink, resetInferredMask, setObjectSinkPropagator, setParentObjectSource, setPartitionId, setPartitionIdWithSinks, setSourcePartitionId, updateMaskMethods 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, setStreamModeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.core.reteoo.LeftTupleSink
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, removeAssociatedTerminalMethods inherited from interface org.drools.core.reteoo.PathEndNode
calculatePathMemSpec
-
Constructor Details
-
RightInputAdapterNode
public RightInputAdapterNode() -
RightInputAdapterNode
public RightInputAdapterNode(int id, LeftTupleSource source, LeftTupleSource startTupleSource, BuildContext context) Constructor specifying the unique id of the node in the Rete network, the position of the propagatingFactHandleImplinReteTupleand the source that propagates the receiveReteTuples.- Parameters:
id- Unique idsource- TheTupleSourcewhich propagates the receivedReteTuple
-
-
Method Details
-
getPathMemSpec
- Specified by:
getPathMemSpecin interfacePathEndNode
-
getPathMemSpec
used during network build time, potentially during rule removal time.- Specified by:
getPathMemSpecin interfacePathEndNode- Parameters:
removingTN-- Returns:
-
nullPathMemSpec
public void nullPathMemSpec()- Specified by:
nullPathMemSpecin interfacePathEndNode
-
setPathMemSpec
- Specified by:
setPathMemSpecin interfacePathEndNode
-
resetPathMemSpec
- Specified by:
resetPathMemSpecin interfacePathEndNode
-
setSegmentPrototypes
- Specified by:
setSegmentPrototypesin interfacePathEndNode
-
getSegmentPrototypes
- Specified by:
getSegmentPrototypesin interfacePathEndNode
-
getEagerSegmentPrototypes
- Specified by:
getEagerSegmentPrototypesin interfacePathEndNode
-
setEagerSegmentPrototypes
- Specified by:
setEagerSegmentPrototypesin interfacePathEndNode
-
setPathEndNodes
- Specified by:
setPathEndNodesin interfacePathEndNode
-
getPathEndNodes
- Specified by:
getPathEndNodesin interfacePathEndNode
-
getStartTupleSource
- Specified by:
getStartTupleSourcein 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
-
createMemory
public RightInputAdapterNode.RiaPathMemory createMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator) Creates and return the node memory- Specified by:
createMemoryin interfaceMemoryFactory<PathMemory>
-
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- Overrides:
networkUpdatedin classObjectSource
-
doRemove
Description copied from class:BaseNodeRemoves the node from the network. Usually from the parentObjectSourceorTupleSource- Overrides:
doRemovein classObjectSource
-
isLeftTupleMemoryEnabled
public boolean isLeftTupleMemoryEnabled()- Specified by:
isLeftTupleMemoryEnabledin interfaceLeftTupleSink
-
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
-
equals
-
toString
-
getLeftTupleSource
- Specified by:
getLeftTupleSourcein interfaceLeftTupleNode
-
setTupleSource
-
getLeftInputOtnId
- Specified by:
getLeftInputOtnIdin interfaceLeftTupleSink
-
setLeftInputOtnId
- Specified by:
setLeftInputOtnIdin interfaceLeftTupleSink
-
calculateDeclaredMask
public org.drools.util.bitmask.BitMask calculateDeclaredMask(Pattern pattern, ObjectType modifiedType, List<String> settableProperties) - Specified by:
calculateDeclaredMaskin classObjectSource
-
getLeftInferredMask
public org.drools.util.bitmask.BitMask getLeftInferredMask()- Specified by:
getLeftInferredMaskin interfaceLeftTupleSink
-
updateSink
- Specified by:
updateSinkin classObjectSource
-
getPathNodes
- Specified by:
getPathNodesin interfacePathEndNode
-
hasPathNode
- Specified by:
hasPathNodein interfacePathEndNode
-
getSinkPropagator
- Specified by:
getSinkPropagatorin interfaceLeftTupleNode
-
addAssociation
- Overrides:
addAssociationin classBaseNode
-
removeAssociation
Description copied from class:BaseNodeRemoves the association to the given rule from the associations map.- Overrides:
removeAssociationin classBaseNode
-