- java.lang.Object
-
- org.apache.lucene.util.fst.NodeHash<T>
-
final class NodeHash<T> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
NodeHash.PagedGrowableHash
Inner class because it needs access to hash function and FST bytes.
-
Field Summary
Fields Modifier and Type Field Description private NodeHash.PagedGrowableHash
fallbackTable
private FSTCompiler<T>
fstCompiler
private long
lastFallbackHashSlot
private int
lastFallbackNodeLength
private NodeHash.PagedGrowableHash
primaryTable
private long
ramLimitBytes
private FST.Arc<T>
scratchArc
-
Constructor Summary
Constructors Constructor Description NodeHash(FSTCompiler<T> fstCompiler, double ramLimitMB)
ramLimitMB is the max RAM we can use for recording suffixes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
add(FSTCompiler.UnCompiledNode<T> nodeIn)
private long
getFallback(FSTCompiler.UnCompiledNode<T> nodeIn, long hash)
private long
hash(FSTCompiler.UnCompiledNode<T> node)
-
-
-
Field Detail
-
primaryTable
private NodeHash.PagedGrowableHash primaryTable
-
ramLimitBytes
private final long ramLimitBytes
-
fallbackTable
private NodeHash.PagedGrowableHash fallbackTable
-
fstCompiler
private final FSTCompiler<T> fstCompiler
-
lastFallbackNodeLength
private int lastFallbackNodeLength
-
lastFallbackHashSlot
private long lastFallbackHashSlot
-
-
Constructor Detail
-
NodeHash
public NodeHash(FSTCompiler<T> fstCompiler, double ramLimitMB)
ramLimitMB is the max RAM we can use for recording suffixes. If we hit this limit, the least recently used suffixes are discarded, and the FST is no longer minimalI. Still, larger ramLimitMB will make the FST smaller (closer to minimal).
-
-
Method Detail
-
getFallback
private long getFallback(FSTCompiler.UnCompiledNode<T> nodeIn, long hash) throws java.io.IOException
- Throws:
java.io.IOException
-
add
public long add(FSTCompiler.UnCompiledNode<T> nodeIn) throws java.io.IOException
- Throws:
java.io.IOException
-
hash
private long hash(FSTCompiler.UnCompiledNode<T> node)
-
-