public class DictionaryBrowserSupplier extends Object implements 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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildResourcesprotected final IndexInput dictionaryInput
protected final BlockDecoder blockDecoder
protected IndexDictionary dictionary
public DictionaryBrowserSupplier(IndexInput dictionaryInput, long startFilePointer, BlockDecoder blockDecoder) throws IOException
IOExceptionpublic IndexDictionary.Browser get()
IndexDictionary thread safely
and creates a new IndexDictionary.Browser.get in interface Supplier<IndexDictionary.Browser>public long ramBytesUsed()
ramBytesUsed in interface AccountableCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.