org.drools.reteoo
Class JoinNode

java.lang.Object
  extended by org.drools.reteoo.TupleSource
      extended by org.drools.reteoo.JoinNode
All Implemented Interfaces:
Serializable

 class JoinNode
extends TupleSource

A two-input Rete-OO join node .

Author:
bob mcwhirter
See Also:
TupleSource, TupleSink

Constructor Summary
JoinNode(TupleSource leftInput, TupleSource rightInput)
          Construct.
 
Method Summary
(package private)  void assertLeftTuple(ReteTuple tuple, WorkingMemoryImpl workingMemory)
          Assert a new Tuple from the left input.
(package private)  void assertRightTuple(ReteTuple tuple, WorkingMemoryImpl workingMemory)
          Assert a new Tuple from the right input.
 void attach()
          Attaches this node into the network.
 boolean equals(Object object)
           
 Set getCommonDeclarations()
          Retrieve the set of common Declarations across the two input TupleSources.
 Set getTupleDeclarations()
          Retrieve the Set of Declarations.
 int hashCode()
           
 void retractTuples(TupleKey key, WorkingMemoryImpl workingMemory)
          Retract tuples.
 String toString()
           
 
Methods inherited from class org.drools.reteoo.TupleSource
addTupleSink, getTupleSinks, propagateAssertTuple, propagateRetractTuples
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoinNode

public JoinNode(TupleSource leftInput,
                TupleSource rightInput)
Construct.

Parameters:
leftInput - The left input TupleSource.
rightInput - The right input TupleSource.
Method Detail

getCommonDeclarations

public Set getCommonDeclarations()
Retrieve the set of common Declarations across the two input TupleSources.

Returns:
The Set of common Declarations.

assertLeftTuple

void assertLeftTuple(ReteTuple tuple,
                     WorkingMemoryImpl workingMemory)
               throws AssertionException
Assert a new Tuple from the left input.

Parameters:
tuple - The Tuple being asserted.
workingMemory - The working memory seesion.
Throws:
AssertionException - If an error occurs while asserting.

assertRightTuple

void assertRightTuple(ReteTuple tuple,
                      WorkingMemoryImpl workingMemory)
                throws AssertionException
Assert a new Tuple from the right input.

Parameters:
tuple - The Tuple being asserted.
workingMemory - The working memory seesion.
Throws:
AssertionException - If an error occurs while asserting.

retractTuples

public void retractTuples(TupleKey key,
                          WorkingMemoryImpl workingMemory)
                   throws RetractionException
Retract tuples.

Parameters:
key - The tuple key.
workingMemory - The working memory seesion.
Throws:
RetractionException - If an error occurs while retracting.

getTupleDeclarations

public Set getTupleDeclarations()
Retrieve the Set of Declarations. in the propagated Tuples.

Specified by:
getTupleDeclarations in class TupleSource
Returns:
The Set of Declarations in progated Tuples.
See Also:
Declaration

attach

public void attach()
Description copied from class: TupleSource
Attaches this node into the network.

Specified by:
attach in class TupleSource

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object


Copyright © 2001-2005 The Codehaus. All Rights Reserved.