public final class RamAccountingTermsEnum
extends org.apache.lucene.index.FilteredTermsEnum
TermsEnum that takes a MemoryCircuitBreaker, increasing the breaker
every time .next(...) is called. Proxies all methods to the original
TermsEnum otherwise.| Constructor and Description |
|---|
RamAccountingTermsEnum(org.apache.lucene.index.TermsEnum termsEnum,
CircuitBreaker breaker,
AbstractIndexFieldData.PerValueEstimator estimator,
String fieldName) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.lucene.index.FilteredTermsEnum.AcceptStatus |
accept(org.apache.lucene.util.BytesRef term)
Always accept the term.
|
void |
flush()
Flush the
flushBuffer to the breaker, incrementing the total
bytes and resetting the buffer. |
long |
getTotalBytes() |
org.apache.lucene.util.BytesRef |
next()
Proxy to the original next() call, but estimates the overhead of
loading the next term.
|
attributes, docFreq, nextSeekTerm, ord, postings, seekCeil, seekExact, seekExact, seekExact, setInitialSeekTerm, term, termState, totalTermFreqpublic RamAccountingTermsEnum(org.apache.lucene.index.TermsEnum termsEnum,
CircuitBreaker breaker,
AbstractIndexFieldData.PerValueEstimator estimator,
String fieldName)
protected org.apache.lucene.index.FilteredTermsEnum.AcceptStatus accept(org.apache.lucene.util.BytesRef term)
throws IOException
accept in class org.apache.lucene.index.FilteredTermsEnumIOExceptionpublic void flush()
flushBuffer to the breaker, incrementing the total
bytes and resetting the buffer.public org.apache.lucene.util.BytesRef next()
throws IOException
next in interface org.apache.lucene.util.BytesRefIteratornext in class org.apache.lucene.index.FilteredTermsEnumIOExceptionpublic long getTotalBytes()
Copyright © 2009–2017. All rights reserved.