public class DictionaryBrowserSupplier extends java.lang.Object implements java.util.function.Supplier<IndexDictionary.Browser>, Accountable
IndexDictionary.Browser
created on
the immutable IndexDictionary
.
The immutable IndexDictionary
is lazy loaded thread safely. This
lazy loading allows us to load it only when TermsEnum.seekCeil(org.apache.lucene.util.BytesRef)
or TermsEnum.seekExact(org.apache.lucene.util.BytesRef)
are called (it is not loaded for a direct
all-terms enumeration).
Modifier and Type | Field and Description |
---|---|
protected BlockDecoder |
blockDecoder |
protected IndexDictionary |
dictionary
Lazy loaded immutable index dictionary (trie hold in RAM).
|
protected IndexInput |
dictionaryInput |
Constructor and Description |
---|
DictionaryBrowserSupplier(IndexInput dictionaryInput,
long startFilePointer,
BlockDecoder blockDecoder) |
Modifier and Type | Method and Description |
---|---|
IndexDictionary.Browser |
get()
Gets or lazy loads the immutable
IndexDictionary thread safely
and creates a new IndexDictionary.Browser . |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildResources
protected final IndexInput dictionaryInput
protected final BlockDecoder blockDecoder
protected IndexDictionary dictionary
public DictionaryBrowserSupplier(IndexInput dictionaryInput, long startFilePointer, BlockDecoder blockDecoder) throws java.io.IOException
java.io.IOException
public IndexDictionary.Browser get()
IndexDictionary
thread safely
and creates a new IndexDictionary.Browser
.get
in interface java.util.function.Supplier<IndexDictionary.Browser>
public long ramBytesUsed()
Accountable
ramBytesUsed
in interface Accountable