Module org.apache.lucene.core
Package org.apache.lucene.index
Class ExitableDirectoryReader.ExitableTermsEnum
java.lang.Object
org.apache.lucene.index.TermsEnum
org.apache.lucene.index.FilterLeafReader.FilterTermsEnum
org.apache.lucene.index.ExitableDirectoryReader.ExitableTermsEnum
- All Implemented Interfaces:
BytesRefIterator
- Enclosing class:
ExitableDirectoryReader
public static class ExitableDirectoryReader.ExitableTermsEnum
extends FilterLeafReader.FilterTermsEnum
Wrapper class for TermsEnum that is used by ExitableTerms for implementing an exitable
enumeration of terms.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus -
Field Summary
FieldsFields inherited from class org.apache.lucene.index.FilterLeafReader.FilterTermsEnum
in -
Constructor Summary
ConstructorsConstructorDescriptionExitableTermsEnum(TermsEnum termsEnum, QueryTimeout queryTimeout) Constructor * -
Method Summary
Modifier and TypeMethodDescriptionprivate voidThrowsExitableDirectoryReader.ExitingReaderExceptionifQueryTimeout.shouldExit()returns true, or ifThread.interrupted()returns true.next()Increments the iteration to the nextBytesRefin the iterator.Methods inherited from class org.apache.lucene.index.FilterLeafReader.FilterTermsEnum
attributes, docFreq, impacts, ord, postings, seekCeil, seekExact, seekExact, seekExact, term, termState, totalTermFreq
-
Field Details
-
NUM_CALLS_PER_TIMEOUT_CHECK
private static final int NUM_CALLS_PER_TIMEOUT_CHECK- See Also:
-
calls
private int calls -
queryTimeout
-
-
Constructor Details
-
ExitableTermsEnum
Constructor *
-
-
Method Details
-
checkTimeoutWithSampling
private void checkTimeoutWithSampling()ThrowsExitableDirectoryReader.ExitingReaderExceptionifQueryTimeout.shouldExit()returns true, or ifThread.interrupted()returns true. -
next
Description copied from interface:BytesRefIteratorIncrements the iteration to the nextBytesRefin the iterator. Returns the resultingBytesRefornullif the end of the iterator is reached. The returned BytesRef may be re-used across calls to next. After this method returns null, do not call it again: the results are undefined.- Specified by:
nextin interfaceBytesRefIterator- Overrides:
nextin classFilterLeafReader.FilterTermsEnum- Returns:
- the next
BytesRefin the iterator ornullif the end of the iterator is reached. - Throws:
IOException- If there is a low-level I/O error.
-