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:
MemoryFactory<RightInputAdapterNode.RiaPathMemory>,NetworkNode,LeftTupleNode,LeftTupleSink,LeftTupleSinkNode,PathEndNode,Sink
public class RightInputAdapterNode extends ObjectSource implements LeftTupleSinkNode, PathEndNode, MemoryFactory<RightInputAdapterNode.RiaPathMemory>
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRightInputAdapterNode.RiaPathMemory-
Nested 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, source
-
Fields inherited from class org.drools.core.common.BaseNode
associatedTerminals, associations, hashcode, id, memoryId, partitionId, partitionsEnabled, posInSegment
-
-
Constructor Summary
Constructors Constructor Description RightInputAdapterNode()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.
-
Method Summary
-
Methods inherited from class org.drools.core.reteoo.ObjectSource
addObjectSink, getDeclaredMask, getObjectSinkPropagator, getObjectTypeNode, getParentObjectSource, getRuleBase, initDeclaredMask, isInUse, removeObjectSink, resetInferredMask, setObjectSinkPropagator, setParentObjectSource, setPartitionId, setPartitionIdWithSinks, setSourcePartitionId, updateMask
-
Methods inherited from class org.drools.core.common.BaseNode
addAssociation, attach, getAssociatedRules, getAssociatedTerminals, getAssociationsSize, getId, getMemoryId, getPartitionId, getPosInSegment, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, setId, setPartitionsEnabled, setPosInSegment, setStreamMode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleSink
setPartitionIdWithSinks
-
Methods inherited from interface org.drools.core.common.MemoryFactory
getMemoryId
-
Methods inherited from interface org.drools.core.common.NetworkNode
getAssociatedRules, getAssociatedTerminals, getId, getPartitionId, getPosInSegment, getSinks, isAssociatedWith
-
Methods inherited from interface org.drools.core.reteoo.PathEndNode
calculatePathMemSpec
-
-
-
-
Constructor Detail
-
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 Detail
-
getPathMemSpec
public PathEndNode.PathMemSpec getPathMemSpec()
- Specified by:
getPathMemSpecin interfacePathEndNode
-
getPathMemSpec
public PathEndNode.PathMemSpec getPathMemSpec(TerminalNode removingTN)
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
-
setSegmentPrototypes
public void setSegmentPrototypes(SegmentMemory.SegmentPrototype[] smems)
- Specified by:
setSegmentPrototypesin interfacePathEndNode
-
getSegmentPrototypes
public SegmentMemory.SegmentPrototype[] getSegmentPrototypes()
- Specified by:
getSegmentPrototypesin interfacePathEndNode
-
getEagerSegmentPrototypes
public SegmentMemory.SegmentPrototype[] getEagerSegmentPrototypes()
- Specified by:
getEagerSegmentPrototypesin interfacePathEndNode
-
setEagerSegmentPrototypes
public void setEagerSegmentPrototypes(SegmentMemory.SegmentPrototype[] eagerSegmentPrototypes)
- Specified by:
setEagerSegmentPrototypesin interfacePathEndNode
-
setPathEndNodes
public void setPathEndNodes(PathEndNode[] pathEndNodes)
- Specified by:
setPathEndNodesin interfacePathEndNode
-
getPathEndNodes
public PathEndNode[] getPathEndNodes()
- Specified by:
getPathEndNodesin interfacePathEndNode
-
getStartTupleSource
public LeftTupleSource 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<RightInputAdapterNode.RiaPathMemory>
-
createPeer
public SubnetworkTuple createPeer(LeftTuple original)
- Specified by:
createPeerin interfaceLeftTupleSink
-
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- Overrides:
networkUpdatedin classObjectSource
-
doRemove
protected boolean doRemove(RuleRemovalContext context, ReteooBuilder builder)
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
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
-
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
-
getLeftTupleSource
public LeftTupleSource getLeftTupleSource()
- Specified by:
getLeftTupleSourcein interfaceLeftTupleNode
-
setTupleSource
public void setTupleSource(LeftTupleSource tupleSource)
-
getLeftInputOtnId
public ObjectTypeNode.Id getLeftInputOtnId()
- Specified by:
getLeftInputOtnIdin interfaceLeftTupleSink
-
setLeftInputOtnId
public void setLeftInputOtnId(ObjectTypeNode.Id leftInputOtnId)
- Specified by:
setLeftInputOtnIdin interfaceLeftTupleSink
-
calculateDeclaredMask
public BitMask calculateDeclaredMask(ObjectType modifiedType, List<String> settableProperties)
- Specified by:
calculateDeclaredMaskin classObjectSource
-
getLeftInferredMask
public BitMask getLeftInferredMask()
- Specified by:
getLeftInferredMaskin interfaceLeftTupleSink
-
updateSink
public void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory wm)
- Specified by:
updateSinkin classObjectSource
-
getPathNodes
public LeftTupleNode[] getPathNodes()
- Specified by:
getPathNodesin interfacePathEndNode
-
hasPathNode
public boolean hasPathNode(LeftTupleNode node)
- Specified by:
hasPathNodein interfacePathEndNode
-
getSinkPropagator
public LeftTupleSinkPropagator getSinkPropagator()
- Specified by:
getSinkPropagatorin interfaceLeftTupleNode
-
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
-
-