Package org.drools.core.util.index
Class FastUtilTreeMemory
- java.lang.Object
-
- org.drools.core.util.index.AbstractTupleIndexTree
-
- org.drools.core.util.index.FastUtilTreeMemory
-
- All Implemented Interfaces:
TupleMemory
public class FastUtilTreeMemory extends AbstractTupleIndexTree implements TupleMemory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFastUtilTreeMemory.HolderEntrystatic classFastUtilTreeMemory.TreeFastFullIteratorstatic classFastUtilTreeMemory.TreeFastIterator-
Nested classes/interfaces inherited from class org.drools.core.util.index.AbstractTupleIndexTree
AbstractTupleIndexTree.IndexTupleList
-
Nested classes/interfaces inherited from interface org.drools.core.reteoo.TupleMemory
TupleMemory.IndexType
-
-
Field Summary
-
Fields inherited from class org.drools.core.util.index.AbstractTupleIndexTree
constraintType, factSize, index, left
-
-
Constructor Summary
Constructors Constructor Description FastUtilTreeMemory(IndexUtil.ConstraintType constraintType, AbstractHashTable.FieldIndex index, boolean left)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Tuple tuple)voidclear()FastIterator<Tuple>fastIterator()FastIteratorfullFastIterator()Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.FastIteratorfullFastIterator(Tuple tuple)Iterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or notTuplegetFirst(Tuple tuple)The FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories.TupleMemory.IndexTypegetIndexType()booleanisIndexed()Iterator<Tuple>iterator()voidremove(Tuple tuple)voidremoveAdd(Tuple tuple)intsize()Tuple[]toArray()-
Methods inherited from class org.drools.core.util.index.AbstractTupleIndexTree
getIndexedValue, getLeftIndexedValue, getRightIndexedValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.drools.core.reteoo.TupleMemory
getIndex
-
-
-
-
Constructor Detail
-
FastUtilTreeMemory
public FastUtilTreeMemory(IndexUtil.ConstraintType constraintType, AbstractHashTable.FieldIndex index, boolean left)
-
-
Method Detail
-
getFirst
public Tuple getFirst(Tuple tuple)
Description copied from interface:TupleMemoryThe 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:
getFirstin interfaceTupleMemory
-
removeAdd
public void removeAdd(Tuple tuple)
- Specified by:
removeAddin interfaceTupleMemory
-
add
public void add(Tuple tuple)
- Specified by:
addin interfaceTupleMemory
-
remove
public void remove(Tuple tuple)
- Specified by:
removein interfaceTupleMemory
-
isIndexed
public boolean isIndexed()
- Specified by:
isIndexedin interfaceTupleMemory- Overrides:
isIndexedin classAbstractTupleIndexTree
-
size
public int size()
- Specified by:
sizein interfaceTupleMemory
-
iterator
public Iterator<Tuple> iterator()
- Specified by:
iteratorin interfaceTupleMemory
-
fastIterator
public FastIterator<Tuple> fastIterator()
- Specified by:
fastIteratorin interfaceTupleMemory
-
fullFastIterator
public FastIterator fullFastIterator()
Description copied from interface:TupleMemoryIterates the entire data structure, regardless of whether TupleMemory is hashed or not.- Specified by:
fullFastIteratorin interfaceTupleMemory- Returns:
-
fullFastIterator
public FastIterator fullFastIterator(Tuple tuple)
Description copied from interface:TupleMemoryIterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or not- Specified by:
fullFastIteratorin interfaceTupleMemory- Returns:
-
toArray
public Tuple[] toArray()
- Specified by:
toArrayin interfaceTupleMemory
-
getIndexType
public TupleMemory.IndexType getIndexType()
- Specified by:
getIndexTypein interfaceTupleMemory
-
clear
public void clear()
- Specified by:
clearin interfaceTupleMemory
-
-