Package org.drools.core.reteoo
Interface TupleMemory
-
- All Known Implementing Classes:
AbstractHashTable.IndexTupleList,AbstractTupleIndexTree.IndexTupleList,FastUtilHashTupleMemory,FastUtilHashTupleMemory.IndexTupleList,FastUtilTreeMemory,TupleIndexHashTable,TupleIndexRBTree,TupleList,TupleRBTree.Node
public interface TupleMemory
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTupleMemory.IndexType
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidadd(Tuple tuple)voidclear()FastIterator<Tuple>fastIterator()FastIterator<Tuple>fullFastIterator()Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.FastIterator<Tuple>fullFastIterator(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.default AbstractHashTable.IndexgetIndex()TupleMemory.IndexTypegetIndexType()booleanisIndexed()Iterator<Tuple>iterator()voidremove(Tuple tuple)voidremoveAdd(Tuple tuple)intsize()Tuple[]toArray()
-
-
-
Method Detail
-
getIndex
default AbstractHashTable.Index getIndex()
-
getFirst
Tuple getFirst(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. 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.
-
removeAdd
void removeAdd(Tuple tuple)
-
add
void add(Tuple tuple)
-
remove
void remove(Tuple tuple)
-
isIndexed
boolean isIndexed()
-
size
int size()
-
fastIterator
FastIterator<Tuple> fastIterator()
-
fullFastIterator
FastIterator<Tuple> fullFastIterator()
Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.- Returns:
-
fullFastIterator
FastIterator<Tuple> fullFastIterator(Tuple tuple)
Iterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or not- Parameters:
tuple-- Returns:
-
toArray
Tuple[] toArray()
-
getIndexType
TupleMemory.IndexType getIndexType()
-
clear
void clear()
-
-