Drools :: Core 6.1.0.Beta1

org.drools.core.reteoo
Class LeftTupleSource

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

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  LeftTupleSource leftInput
          The left input TupleSource.
protected  LeftTupleSinkPropagator sink
          The destination for Tuples.
 
Fields inherited from class org.drools.core.common.BaseNode
associations, id, partitionId, partitionsEnabled, streamMode
 
Constructor Summary
  LeftTupleSource()
           
protected LeftTupleSource(int id, RuleBasePartitionId partitionId, boolean partitionsEnabled)
          Single parameter constructor that specifies the unique id of the node.
 
Method Summary
 void addTupleSink(LeftTupleSink tupleSink)
           
 void addTupleSink(LeftTupleSink tupleSink, BuildContext context)
          Adds the TupleSink so that it may receive Tuples propagated from this TupleSource.
protected  LeftTupleSinkPropagator addTupleSink(LeftTupleSinkPropagator sinkPropagator, LeftTupleSink tupleSink, BuildContext context)
           
abstract  LeftTuple createPeer(LeftTuple original)
           
 long getLeftDeclaredMask()
           
 long getLeftInferredMask()
           
 ObjectTypeNode.Id getLeftInputOtnId()
           
 long getLeftNegativeMask()
           
 LeftTupleSource getLeftTupleSource()
           
 ObjectType getObjectType()
           
protected abstract  ObjectTypeNode getObjectTypeNode()
           
 LeftTupleSinkPropagator getSinkPropagator()
           
abstract  short getType()
           
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)
abstract  boolean isLeftTupleMemoryEnabled()
           
 void readExternal(ObjectInput in)
           
 void removeTupleSink(LeftTupleSink tupleSink)
          Removes the TupleSink
protected  void setLeftInferredMask(long leftInferredMask)
           
 void setLeftInputOtnId(ObjectTypeNode.Id leftInputOtnId)
           
protected  void setLeftListenedProperties(List<String> leftListenedProperties)
           
 void setLeftTupleSource(LeftTupleSource leftInput)
           
abstract  void updateSink(LeftTupleSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.drools.core.common.BaseNode
addAssociation, attach, attach, doRemove, getAssociations, getId, getPartitionId, hashCode, isStreamMode, networkUpdated, remove, removeAssociation, setId, setPartitionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

leftInput

protected LeftTupleSource leftInput
The left input TupleSource.


sink

protected LeftTupleSinkPropagator sink
The destination for Tuples.

Constructor Detail

LeftTupleSource

public LeftTupleSource()

LeftTupleSource

protected LeftTupleSource(int id,
                          RuleBasePartitionId partitionId,
                          boolean partitionsEnabled)
Single parameter constructor that specifies the unique id of the node.

Parameters:
id -
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

getType

public abstract short getType()
Specified by:
getType in interface NetworkNode

createPeer

public abstract LeftTuple createPeer(LeftTuple original)

addTupleSink

public void addTupleSink(LeftTupleSink tupleSink)

getLeftTupleSource

public LeftTupleSource getLeftTupleSource()

setLeftTupleSource

public void setLeftTupleSource(LeftTupleSource leftInput)

addTupleSink

public 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.

addTupleSink

protected LeftTupleSinkPropagator addTupleSink(LeftTupleSinkPropagator sinkPropagator,
                                               LeftTupleSink tupleSink,
                                               BuildContext context)

removeTupleSink

public 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)

getLeftDeclaredMask

public long getLeftDeclaredMask()

getLeftInferredMask

public long getLeftInferredMask()

setLeftInferredMask

protected void setLeftInferredMask(long leftInferredMask)

getLeftNegativeMask

public long getLeftNegativeMask()

getLeftInputOtnId

public ObjectTypeNode.Id getLeftInputOtnId()

setLeftInputOtnId

public void setLeftInputOtnId(ObjectTypeNode.Id leftInputOtnId)

getObjectTypeNode

protected abstract ObjectTypeNode getObjectTypeNode()

getObjectType

public ObjectType getObjectType()

isLeftTupleMemoryEnabled

public abstract boolean isLeftTupleMemoryEnabled()

Drools :: Core 6.1.0.Beta1

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