org.drools.reteoo
Class JoinMemory

java.lang.Object
  extended byorg.drools.reteoo.JoinMemory
All Implemented Interfaces:
Serializable

class JoinMemory
extends Object
implements Serializable

Memory for left and right inputs of a JoinNode.

Author:
bob mcwhirter
See Also:
ReteTuple

Constructor Summary
(package private) JoinMemory(Set tupleDeclarations, Set commonDeclarations)
          Construct.
 
Method Summary
(package private)  TupleSet addLeftTuple(ReteTuple tuple)
          Add a ReteTuple received from the JoinNode's left input to the left side of this memory, and attempt to join to existing Tuples in the right side.
(package private)  TupleSet addRightTuple(ReteTuple tuple)
          Add a ReteTuple received from the JoinNode's right input to the right side of this memory, and attempt to join to existing Tuples in the left side.
 void dump()
           
protected  TupleSet getLeftTuples()
          Retrieve the List of Tuples held in the left side memory.
protected  TupleSet getRightTuples()
          Retrieve the List of Tuples held in the right side memory.
(package private)  TupleSet modifyLeftTuples(FactHandle trigger)
          Modify tuples on the left-side.
(package private)  TupleSet modifyRightTuples(FactHandle trigger)
          Modify tuples on the right-side.
(package private)  boolean retractTuples(TupleKey key)
          Retract tuples from this memory.
 String toString()
          Produce debug string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JoinMemory

JoinMemory(Set tupleDeclarations,
           Set commonDeclarations)
Construct.

Parameters:
tupleDeclarations -
commonDeclarations -
Method Detail

retractTuples

boolean retractTuples(TupleKey key)
Retract tuples from this memory.

Parameters:
key - The key for the tuples to be removed.
Returns:
true if at least one tuple was removed; false otherwise.

addLeftTuple

TupleSet addLeftTuple(ReteTuple tuple)
Add a ReteTuple received from the JoinNode's left input to the left side of this memory, and attempt to join to existing Tuples in the right side.

Parameters:
tuple - The Tuple to add to the left side memory.
Returns:
A Set of Tuples successfully created by joining the incoming tuple against existing Tuples on the right side memory.
See Also:
JoinNode, ReteTuple

addRightTuple

TupleSet addRightTuple(ReteTuple tuple)
Add a ReteTuple received from the JoinNode's right input to the right side of this memory, and attempt to join to existing Tuples in the left side.

Parameters:
tuple - The Tuple to add to the right side memory.
Returns:
A Set of Tuples successfully created by joining the incoming tuple against existing Tuples on the left side memory.
See Also:
JoinNode, ReteTuple

getLeftTuples

protected TupleSet getLeftTuples()
Retrieve the List of Tuples held in the left side memory.

Returns:
The List of Tuples help in the left side memory.

getRightTuples

protected TupleSet getRightTuples()
Retrieve the List of Tuples held in the right side memory.

Returns:
The List of Tuples help in the right side memory.

modifyLeftTuples

TupleSet modifyLeftTuples(FactHandle trigger)
Modify tuples on the left-side.

Parameters:
trigger - Triggering object handle.
Returns:
The newly joined tuples.

modifyRightTuples

TupleSet modifyRightTuples(FactHandle trigger)
Modify tuples on the right-side.

Parameters:
trigger - Triggering object handle.
Returns:
The newly joined tuples.

toString

public String toString()
Produce debug string.

Returns:
The debug string.

dump

public void dump()


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