Package org.drools.core.util.index
Class FastUtilHashTupleMemory
- java.lang.Object
-
- org.drools.core.util.index.FastUtilHashTupleMemory
-
- All Implemented Interfaces:
TupleMemory
public class FastUtilHashTupleMemory extends java.lang.Object implements TupleMemory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFastUtilHashTupleMemory.FullFastIteratorstatic classFastUtilHashTupleMemory.FullIteratorstatic classFastUtilHashTupleMemory.HashStrategystatic classFastUtilHashTupleMemory.IndexTupleList-
Nested classes/interfaces inherited from interface org.drools.core.reteoo.TupleMemory
TupleMemory.IndexType
-
-
Field Summary
Fields Modifier and Type Field Description static intPRIME
-
Constructor Summary
Constructors Constructor Description FastUtilHashTupleMemory(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()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.AbstractHashTable.IndexgetIndex()TupleMemory.IndexTypegetIndexType()booleanisIndexed()Iteratoriterator()voidremove(Tuple tuple)voidremoveAdd(Tuple tuple)intsize()Tuple[]toArray()
-
-
-
Field Detail
-
PRIME
public static final int PRIME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FastUtilHashTupleMemory
public FastUtilHashTupleMemory(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
-
size
public int size()
- Specified by:
sizein interfaceTupleMemory
-
iterator
public Iterator iterator()
- Specified by:
iteratorin interfaceTupleMemory
-
fastIterator
public FastIterator<Tuple> fastIterator()
- Specified by:
fastIteratorin interfaceTupleMemory
-
fullFastIterator
public FastIterator<Tuple> 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<Tuple> 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
-
getIndex
public AbstractHashTable.Index getIndex()
- Specified by:
getIndexin interfaceTupleMemory
-
getIndexType
public TupleMemory.IndexType getIndexType()
- Specified by:
getIndexTypein interfaceTupleMemory
-
clear
public void clear()
- Specified by:
clearin interfaceTupleMemory
-
-