Drools :: Core 6.0.0.Beta5

org.drools.core.util.index
Class RightTupleIndexRBTree

java.lang.Object
  extended by org.drools.core.util.index.RightTupleIndexRBTree
All Implemented Interfaces:
Externalizable, Serializable, RightTupleMemory

public class RightTupleIndexRBTree
extends Object
implements RightTupleMemory, Externalizable

See Also:
Serialized Form

Nested Class Summary
 class RightTupleIndexRBTree.RightTupleFastIterator
           
 
Nested classes/interfaces inherited from interface org.drools.core.reteoo.RightTupleMemory
RightTupleMemory.IndexType
 
Constructor Summary
RightTupleIndexRBTree()
           
RightTupleIndexRBTree(IndexUtil.ConstraintType constraintType, AbstractHashTable.FieldIndex index)
           
 
Method Summary
 void add(RightTuple tuple)
           
 boolean contains(RightTuple tuple)
           
 FastIterator fastIterator()
           
 FastIterator fullFastIterator()
          Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.
 FastIterator fullFastIterator(RightTuple tuple)
          Iterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or not
 RightTuple getFirst(LeftTuple tuple, InternalFactHandle factHandle, FastIterator rightTupleIterator)
          The FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories.
 RightTupleMemory.IndexType getIndexType()
           
 boolean isIndexed()
           
 Iterator iterator()
           
 void readExternal(ObjectInput in)
           
 void remove(RightTuple tuple)
           
 void removeAdd(RightTuple tuple)
           
 int size()
           
 Entry[] toArray()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RightTupleIndexRBTree

public RightTupleIndexRBTree()

RightTupleIndexRBTree

public RightTupleIndexRBTree(IndexUtil.ConstraintType constraintType,
                             AbstractHashTable.FieldIndex index)
Method Detail

writeExternal

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

readExternal

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

add

public void add(RightTuple tuple)
Specified by:
add in interface RightTupleMemory

remove

public void remove(RightTuple tuple)
Specified by:
remove in interface RightTupleMemory

removeAdd

public void removeAdd(RightTuple tuple)
Specified by:
removeAdd in interface RightTupleMemory

isIndexed

public boolean isIndexed()
Specified by:
isIndexed in interface RightTupleMemory

size

public int size()
Specified by:
size in interface RightTupleMemory

toArray

public Entry[] toArray()
Specified by:
toArray in interface RightTupleMemory

getFirst

public RightTuple getFirst(LeftTuple tuple,
                           InternalFactHandle factHandle,
                           FastIterator rightTupleIterator)
Description copied from interface: RightTupleMemory
The FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories. This is because the memory on the opposite side would not have yet memory.removeAdd the fact, so it could potentially be in the wrong bucket. So the bucket matches check always checks to ignore the first facthandle if it's the same as the context fact.

Specified by:
getFirst in interface RightTupleMemory
Returns:

iterator

public Iterator iterator()
Specified by:
iterator in interface RightTupleMemory

contains

public boolean contains(RightTuple tuple)
Specified by:
contains in interface RightTupleMemory

fastIterator

public FastIterator fastIterator()
Specified by:
fastIterator in interface RightTupleMemory

fullFastIterator

public FastIterator fullFastIterator()
Description copied from interface: RightTupleMemory
Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.

Specified by:
fullFastIterator in interface RightTupleMemory
Returns:

fullFastIterator

public FastIterator fullFastIterator(RightTuple tuple)
Description copied from interface: RightTupleMemory
Iterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or not

Specified by:
fullFastIterator in interface RightTupleMemory
Returns:

getIndexType

public RightTupleMemory.IndexType getIndexType()
Specified by:
getIndexType in interface RightTupleMemory

Drools :: Core 6.0.0.Beta5

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