Package org.drools.core.util.index
Class TupleIndexHashTable
java.lang.Object
org.drools.core.util.AbstractHashTable
org.drools.core.util.index.TupleIndexHashTable
- All Implemented Interfaces:
Externalizable,Serializable,TupleMemory
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class org.drools.core.util.AbstractHashTable
AbstractHashTable.DoubleCompositeIndex, AbstractHashTable.DoubleHashEntry, AbstractHashTable.HashEntry, AbstractHashTable.Index, AbstractHashTable.IndexTupleList, AbstractHashTable.SingleHashEntry, AbstractHashTable.SingleIndex, AbstractHashTable.TripleCompositeIndex, AbstractHashTable.TripleHashEntryNested classes/interfaces inherited from interface org.drools.core.reteoo.TupleMemory
TupleMemory.IndexType -
Field Summary
Fields inherited from class org.drools.core.util.AbstractHashTable
loadFactor, PRIME, size, table, threshold -
Constructor Summary
ConstructorsConstructorDescriptionTupleIndexHashTable(int capacity, float loadFactor, AbstractHashTable.Index index, boolean left) TupleIndexHashTable(AbstractHashTable.Index index, boolean left) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.fullFastIterator(TupleImpl tuple) Iterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or notThe FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories.getIndex()intgetResizeHashcode(TupleList entry) voidbooleaniterator()voidvoidvoidintsize()toString()voidMethods inherited from class org.drools.core.util.AbstractHashTable
ensureCapacity, getTable, indexOf, isEmpty, newIterator, resize
-
Constructor Details
-
TupleIndexHashTable
public TupleIndexHashTable() -
TupleIndexHashTable
-
TupleIndexHashTable
public TupleIndexHashTable(int capacity, float loadFactor, AbstractHashTable.Index index, boolean left)
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classAbstractHashTable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classAbstractHashTable- Throws:
IOException
-
init
-
iterator
- Overrides:
iteratorin classAbstractHashTable
-
fastIterator
- Specified by:
fastIteratorin interfaceTupleMemory
-
fullFastIterator
Description copied from interface:TupleMemoryIterates the entire data structure, regardless of whether TupleMemory is hashed or not.- Specified by:
fullFastIteratorin interfaceTupleMemory- Returns:
-
fullFastIterator
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:
-
getFirst
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
-
isIndexed
public boolean isIndexed()- Specified by:
isIndexedin interfaceTupleMemory
-
getIndex
- Specified by:
getIndexin interfaceTupleMemory
-
getResizeHashcode
- Specified by:
getResizeHashcodein classAbstractHashTable
-
removeAdd
- Specified by:
removeAddin interfaceTupleMemory
-
add
- Specified by:
addin interfaceTupleMemory
-
remove
- Specified by:
removein interfaceTupleMemory
-
size
public int size()- Specified by:
sizein interfaceTupleMemory- Overrides:
sizein classAbstractHashTable
-
toString
- Overrides:
toStringin classAbstractHashTable
-
clear
public void clear()- Specified by:
clearin interfaceTupleMemory- Overrides:
clearin classAbstractHashTable
-
getIndexType
- Specified by:
getIndexTypein interfaceTupleMemory
-