org.drools.reteoo
Class LeftTupleSource

java.lang.Object
  extended by org.drools.common.BaseNode
      extended by org.drools.reteoo.LeftTupleSource
All Implemented Interfaces:
Externalizable, Serializable, NetworkNode
Direct Known Subclasses:
BetaNode, EvalConditionNode, FromNode, LeftInputAdapterNode, QueryElementNode, QueryRiaFixerNode

public abstract class LeftTupleSource
extends BaseNode
implements Externalizable

A source of ReteTuple s for a TupleSink.

Nodes that propagate Tuples extend this class.

See Also:
LeftTupleSource, LeftTuple, Serialized Form

Field Summary
protected  LeftTupleSinkPropagator sink
          The destination for Tuples.
 
Fields inherited from class org.drools.common.BaseNode
associations, id, partitionId, partitionsEnabled
 
Constructor Summary
LeftTupleSource()
           
 
Method Summary
 void addTupleSink(LeftTupleSink tupleSink)
           
protected  void addTupleSink(LeftTupleSink tupleSink, BuildContext context)
          Adds the TupleSink so that it may receive Tuples propagated from this TupleSource.
static void doModifyLeftTuple(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory, LeftTupleSink sink, int leftInputOtnId, long leftInferredMask)
           
 long getLeftDeclaredMask()
           
 long getLeftInferredMask()
           
 int getLeftInputOtnId()
           
 long getLeftNegativeMask()
           
 ObjectType getObjectType()
           
protected abstract  ObjectTypeNode getObjectTypeNode()
           
 LeftTupleSinkPropagator getSinkPropagator()
           
protected  void initDeclaredMask(BuildContext context, LeftTupleSource leftInput)
           
protected  void initInferredMask(LeftTupleSource leftInput)
           
protected  void initMasks(BuildContext context, LeftTupleSource leftInput)
           
 boolean isInUse()
          Returns true in case the current node is in use (is referenced by any other node)
 void modifyLeftTuple(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory)
           
 void readExternal(ObjectInput in)
           
protected  void removeTupleSink(LeftTupleSink tupleSink)
          Removes the TupleSink
protected  void setLeftInferredMask(long leftInferredMask)
           
 void setLeftInputOtnId(int leftInputOtnId)
           
protected  void setLeftListenedProperties(List<String> leftListenedProperties)
           
protected  LeftTupleSource unwrapLeftInput(LeftTupleSource leftInput)
           
abstract  void updateSink(LeftTupleSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.drools.common.BaseNode
addAssociation, attach, attach, doRemove, getAssociations, getId, getPartitionId, hashCode, networkUpdated, remove, removeAssociation, setPartitionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

sink

protected LeftTupleSinkPropagator sink
The destination for Tuples.

Constructor Detail

LeftTupleSource

public LeftTupleSource()
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class BaseNode
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class BaseNode
Throws:
IOException

addTupleSink

public void addTupleSink(LeftTupleSink tupleSink)

addTupleSink

protected void addTupleSink(LeftTupleSink tupleSink,
                            BuildContext context)
Adds the TupleSink so that it may receive Tuples propagated from this TupleSource.

Parameters:
tupleSink - The TupleSink to receive propagated Tuples.

removeTupleSink

protected void removeTupleSink(LeftTupleSink tupleSink)
Removes the TupleSink

Parameters:
tupleSink - The TupleSink to remove

getSinkPropagator

public LeftTupleSinkPropagator getSinkPropagator()

updateSink

public abstract void updateSink(LeftTupleSink sink,
                                PropagationContext context,
                                InternalWorkingMemory workingMemory)

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
Returns:

initMasks

protected final void initMasks(BuildContext context,
                               LeftTupleSource leftInput)

initDeclaredMask

protected void initDeclaredMask(BuildContext context,
                                LeftTupleSource leftInput)

setLeftListenedProperties

protected void setLeftListenedProperties(List<String> leftListenedProperties)

initInferredMask

protected void initInferredMask(LeftTupleSource leftInput)

unwrapLeftInput

protected LeftTupleSource unwrapLeftInput(LeftTupleSource leftInput)

modifyLeftTuple

public void modifyLeftTuple(InternalFactHandle factHandle,
                            ModifyPreviousTuples modifyPreviousTuples,
                            PropagationContext context,
                            InternalWorkingMemory workingMemory)

doModifyLeftTuple

public static void doModifyLeftTuple(InternalFactHandle factHandle,
                                     ModifyPreviousTuples modifyPreviousTuples,
                                     PropagationContext context,
                                     InternalWorkingMemory workingMemory,
                                     LeftTupleSink sink,
                                     int leftInputOtnId,
                                     long leftInferredMask)

getLeftDeclaredMask

public long getLeftDeclaredMask()

getLeftInferredMask

public long getLeftInferredMask()

setLeftInferredMask

protected void setLeftInferredMask(long leftInferredMask)

getLeftNegativeMask

public long getLeftNegativeMask()

getLeftInputOtnId

public int getLeftInputOtnId()

setLeftInputOtnId

public void setLeftInputOtnId(int leftInputOtnId)

getObjectTypeNode

protected abstract ObjectTypeNode getObjectTypeNode()

getObjectType

public ObjectType getObjectType()


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.