Package org.drools.core.reteoo
Class FromNode<T extends FromNode.FromMemory>
- java.lang.Object
-
- org.drools.core.common.BaseNode
-
- org.drools.core.reteoo.LeftTupleSource
-
- org.drools.core.reteoo.FromNode<T>
-
- All Implemented Interfaces:
MemoryFactory<T>,NetworkNode,LeftTupleNode,LeftTupleSink,LeftTupleSinkNode,Sink
- Direct Known Subclasses:
ReactiveFromNode
public class FromNode<T extends FromNode.FromMemory> extends LeftTupleSource implements LeftTupleSinkNode, MemoryFactory<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFromNode.FromMemory
-
Field Summary
Fields Modifier and Type Field Description protected AlphaNodeFieldConstraint[]alphaConstraintsprotected BetaConstraintsbetaConstraintsprotected DataProviderdataProviderprotected Fromfromprotected LeftTupleSinkNodenextTupleSinkNodeprotected ObjectTypeConfobjectTypeConfprotected LeftTupleSinkNodepreviousTupleSinkNodeprotected 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 FromNode()FromNode(int id, DataProvider dataProvider, LeftTupleSource tupleSource, AlphaNodeFieldConstraint[] constraints, BetaConstraints binder, boolean tupleMemoryEnabled, BuildContext context, From from)
-
Method Summary
-
Methods inherited from class org.drools.core.reteoo.LeftTupleSource
addTupleSink, addTupleSink, addTupleSink, getLeftDeclaredMask, getLeftInferredMask, getLeftInputOtnId, getLeftNegativeMask, getLeftTupleSource, getObjectCount, getObjectType, getObjectTypeForPropertyReactivity, getPathIndex, getSinkPropagator, initInferredMask, initMasks, isInUse, removeTupleSink, setLeftInferredMask, setLeftInputOtnId, setLeftListenedProperties, setLeftTupleSource, setObjectCount, setPartitionIdWithSinks, setSourcePartitionId, setSourcePartitionId
-
Methods inherited from class org.drools.core.common.BaseNode
addAssociation, addAssociation, attach, getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionId, setPartitionsEnabled, setStreamMode, toString
-
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
getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, isAssociatedWith
-
-
-
-
Field Detail
-
dataProvider
protected DataProvider dataProvider
-
alphaConstraints
protected AlphaNodeFieldConstraint[] alphaConstraints
-
betaConstraints
protected BetaConstraints betaConstraints
-
previousTupleSinkNode
protected LeftTupleSinkNode previousTupleSinkNode
-
nextTupleSinkNode
protected LeftTupleSinkNode nextTupleSinkNode
-
from
protected From from
-
tupleMemoryEnabled
protected boolean tupleMemoryEnabled
-
objectTypeConf
protected transient ObjectTypeConf objectTypeConf
-
-
Constructor Detail
-
FromNode
public FromNode()
-
FromNode
public FromNode(int id, DataProvider dataProvider, LeftTupleSource tupleSource, AlphaNodeFieldConstraint[] constraints, BetaConstraints binder, boolean tupleMemoryEnabled, BuildContext context, From from)
-
-
Method Detail
-
getDataProvider
public DataProvider getDataProvider()
-
getAlphaConstraints
public AlphaNodeFieldConstraint[] getAlphaConstraints()
-
getBetaConstraints
public BetaConstraints getBetaConstraints()
-
initDeclaredMask
protected void initDeclaredMask(BuildContext context, LeftTupleSource leftInput)
- Overrides:
initDeclaredMaskin classLeftTupleSource
-
getLeftInputPattern
protected Pattern getLeftInputPattern(BuildContext context)
- Overrides:
getLeftInputPatternin classLeftTupleSource
-
setNodeConstraintsPropertyReactiveMask
protected BitMask setNodeConstraintsPropertyReactiveMask(BitMask mask, ObjectType objectType, List<String> accessibleProperties)
- Overrides:
setNodeConstraintsPropertyReactiveMaskin classLeftTupleSource
-
getResultClass
public Class<?> getResultClass()
-
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
-
createRightTuple
public RightTuple createRightTuple(LeftTuple leftTuple, PropagationContext context, ReteEvaluator reteEvaluator, Object object)
-
createFactHandle
public InternalFactHandle createFactHandle(ReteEvaluator reteEvaluator, Object object)
-
addToCreatedHandlesMap
public void addToCreatedHandlesMap(Map<Object,RightTuple> matches, RightTuple rightTuple)
-
createMemory
public T createMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator)
- Specified by:
createMemoryin interfaceMemoryFactory<T extends FromNode.FromMemory>
-
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
-
setLeftTupleMemoryEnabled
public void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
- Specified by:
setLeftTupleMemoryEnabledin 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- 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
-
doAttach
public void doAttach(BuildContext context)
-
doRemove
protected boolean doRemove(RuleRemovalContext context, ReteooBuilder builder)
Description copied from class:BaseNodeRemoves the node from the network. Usually from the parentObjectSourceorTupleSource
-
-