Package org.drools.core.reteoo
Class ObjectSource
java.lang.Object
org.drools.core.common.BaseNode
org.drools.core.reteoo.ObjectSource
- All Implemented Interfaces:
Serializable,NetworkNode
- Direct Known Subclasses:
AlphaNode,EntryPointNode,ObjectTypeNode,Rete,RightInputAdapterNode,WindowNode
A source of
FactHandles for an ObjectSink.
Nodes that propagate FactHandleImpl extend this class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected org.drools.util.bitmask.BitMaskprotected org.drools.util.bitmask.BitMaskprotected ObjectSinkPropagatorThe destination forFactHandleImpl.protected ObjectSourceFields inherited from class org.drools.core.common.BaseNode
associations, hashcode, id, memoryId, partitionId -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedObjectSource(int id, RuleBasePartitionId partitionId) Single parameter constructor that specifies the unique id of the node. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObjectSink(ObjectSink objectSink) Adds theObjectSinkso that it may receiveFactHandleImplpropagated from thisObjectSource.abstract org.drools.util.bitmask.BitMaskcalculateDeclaredMask(Pattern pattern, ObjectType modifiedType, List<String> settableProperties) protected booleandoRemove(RuleRemovalContext context, ReteooBuilder builder) Removes the node from the network.org.drools.util.bitmask.BitMaskvoidinitDeclaredMask(BuildContext context) booleanisInUse()Returns true in case the current node is in use (is referenced by any other node)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 updatevoidremoveObjectSink(ObjectSink objectSink) Removes theObjectSinkvoidvoidvoidsetParentObjectSource(ObjectSource source) voidsetPartitionId(BuildContext context, RuleBasePartitionId partitionId) Sets the partition this node belongs tofinal voidsetPartitionIdWithSinks(RuleBasePartitionId partitionId) final RuleBasePartitionIdsetSourcePartitionId(RuleBasePartitionId partitionId) org.drools.util.bitmask.BitMaskupdateMask(org.drools.util.bitmask.BitMask mask) abstract voidupdateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory) Methods inherited from class org.drools.core.common.BaseNode
addAssociatedTerminal, addAssociation, addAssociation, attach, doAttach, getAssociatedRules, getAssociatedTerminalsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hasAssociatedTerminal, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociatedTerminal, removeAssociation, setId, setStreamMode, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.base.common.NetworkNode
getType, isRightInputIsRiaNode
-
Field Details
-
sink
The destination forFactHandleImpl. -
source
-
alphaNodeHashingThreshold
protected int alphaNodeHashingThreshold -
alphaNodeRangeIndexThreshold
protected int alphaNodeRangeIndexThreshold -
declaredMask
protected org.drools.util.bitmask.BitMask declaredMask -
inferredMask
protected org.drools.util.bitmask.BitMask inferredMask
-
-
Constructor Details
-
ObjectSource
public ObjectSource() -
ObjectSource
Single parameter constructor that specifies the unique id of the node.
-
-
Method Details
-
getParentObjectSource
-
setParentObjectSource
-
getRuleBase
-
initDeclaredMask
-
calculateDeclaredMask
public abstract org.drools.util.bitmask.BitMask calculateDeclaredMask(Pattern pattern, ObjectType modifiedType, List<String> settableProperties) -
resetInferredMask
public void resetInferredMask() -
updateMask
public org.drools.util.bitmask.BitMask updateMask(org.drools.util.bitmask.BitMask mask) -
setPartitionId
Description copied from class:BaseNodeSets the partition this node belongs to- Overrides:
setPartitionIdin classBaseNode
-
setSourcePartitionId
-
setPartitionIdWithSinks
-
addObjectSink
Adds theObjectSinkso that it may receiveFactHandleImplpropagated from thisObjectSource.- Parameters:
objectSink- TheObjectSinkto receive propagatedFactHandleImpl.
-
removeObjectSink
Removes theObjectSink- Parameters:
objectSink- TheObjectSinkto remove
-
updateSink
public abstract void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory) -
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
-
getObjectSinkPropagator
-
setObjectSinkPropagator
-
isInUse
public boolean isInUse()Description copied from class:BaseNodeReturns true in case the current node is in use (is referenced by any other node) -
doRemove
Description copied from class:BaseNodeRemoves the node from the network. Usually from the parentObjectSourceorTupleSource -
getObjectTypeNode
- Specified by:
getObjectTypeNodein classBaseNode
-
getDeclaredMask
public org.drools.util.bitmask.BitMask getDeclaredMask()
-