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

public abstract class ObjectSource extends BaseNode
A source of FactHandles for an ObjectSink.

Nodes that propagate FactHandleImpl extend this class.

See Also:
  • Field Details

    • sink

      protected ObjectSinkPropagator sink
      The destination for FactHandleImpl.
    • source

      protected ObjectSource 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

      protected ObjectSource(int id, RuleBasePartitionId partitionId)
      Single parameter constructor that specifies the unique id of the node.
  • Method Details

    • getParentObjectSource

      public ObjectSource getParentObjectSource()
    • setParentObjectSource

      public void setParentObjectSource(ObjectSource source)
    • getRuleBase

      public InternalRuleBase getRuleBase()
    • initDeclaredMask

      public void initDeclaredMask(BuildContext context)
    • 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

      public void setPartitionId(BuildContext context, RuleBasePartitionId partitionId)
      Description copied from class: BaseNode
      Sets the partition this node belongs to
      Overrides:
      setPartitionId in class BaseNode
    • setSourcePartitionId

      public final RuleBasePartitionId setSourcePartitionId(RuleBasePartitionId partitionId)
    • setPartitionIdWithSinks

      public final void setPartitionIdWithSinks(RuleBasePartitionId partitionId)
    • addObjectSink

      public void addObjectSink(ObjectSink objectSink)
      Adds the ObjectSink so that it may receive FactHandleImpl propagated from this ObjectSource.
      Parameters:
      objectSink - The ObjectSink to receive propagated FactHandleImpl.
    • removeObjectSink

      public void removeObjectSink(ObjectSink objectSink)
      Removes the ObjectSink
      Parameters:
      objectSink - The ObjectSink to remove
    • updateSink

      public abstract void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
    • networkUpdated

      public void networkUpdated(UpdateContext updateContext)
      Description copied from class: BaseNode
      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 update
      Specified by:
      networkUpdated in class BaseNode
    • getObjectSinkPropagator

      public ObjectSinkPropagator getObjectSinkPropagator()
    • setObjectSinkPropagator

      public void setObjectSinkPropagator(ObjectSinkPropagator sink)
    • isInUse

      public boolean isInUse()
      Description copied from class: BaseNode
      Returns true in case the current node is in use (is referenced by any other node)
      Specified by:
      isInUse in class BaseNode
    • doRemove

      protected boolean doRemove(RuleRemovalContext context, ReteooBuilder builder)
      Description copied from class: BaseNode
      Removes the node from the network. Usually from the parent ObjectSource or TupleSource
      Specified by:
      doRemove in class BaseNode
    • getObjectTypeNode

      public ObjectTypeNode getObjectTypeNode()
      Specified by:
      getObjectTypeNode in class BaseNode
    • getDeclaredMask

      public org.drools.util.bitmask.BitMask getDeclaredMask()