Package org.apache.lucene.index
Class ExitableDirectoryReader.ExitableIntersectVisitor
- java.lang.Object
-
- org.apache.lucene.index.ExitableDirectoryReader.ExitableIntersectVisitor
-
- All Implemented Interfaces:
PointValues.IntersectVisitor
- Enclosing class:
- ExitableDirectoryReader
private static class ExitableDirectoryReader.ExitableIntersectVisitor extends java.lang.Object implements PointValues.IntersectVisitor
-
-
Field Summary
Fields Modifier and Type Field Description private intcallsprivate PointValues.IntersectVisitorinprivate static intMAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECKprivate QueryTimeoutqueryTimeout
-
Constructor Summary
Constructors Modifier Constructor Description privateExitableIntersectVisitor(PointValues.IntersectVisitor in, QueryTimeout queryTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckAndThrow()private voidcheckAndThrowWithSampling()ThrowsExitableDirectoryReader.ExitingReaderExceptionifQueryTimeout.shouldExit()returns true, or ifThread.interrupted()returns true.PointValues.Relationcompare(byte[] minPackedValue, byte[] maxPackedValue)Called for non-leaf cells to test how the cell relates to the query, to determine how to further recurse down the tree.voidgrow(int count)Notifies the caller that this many documents are about to be visitedvoidvisit(int docID)Called for all documents in a leaf cell that's fully contained by the query.voidvisit(int docID, byte[] packedValue)Called for all documents in a leaf cell that crosses the query.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.index.PointValues.IntersectVisitor
visit
-
-
-
-
Field Detail
-
MAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECK
private static final int MAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECK
- See Also:
- Constant Field Values
-
in
private final PointValues.IntersectVisitor in
-
queryTimeout
private final QueryTimeout queryTimeout
-
calls
private int calls
-
-
Constructor Detail
-
ExitableIntersectVisitor
private ExitableIntersectVisitor(PointValues.IntersectVisitor in, QueryTimeout queryTimeout)
-
-
Method Detail
-
checkAndThrowWithSampling
private void checkAndThrowWithSampling()
ThrowsExitableDirectoryReader.ExitingReaderExceptionifQueryTimeout.shouldExit()returns true, or ifThread.interrupted()returns true.
-
checkAndThrow
private void checkAndThrow()
-
visit
public void visit(int docID) throws java.io.IOExceptionDescription copied from interface:PointValues.IntersectVisitorCalled for all documents in a leaf cell that's fully contained by the query. The consumer should blindly accept the docID.- Specified by:
visitin interfacePointValues.IntersectVisitor- Throws:
java.io.IOException
-
visit
public void visit(int docID, byte[] packedValue) throws java.io.IOExceptionDescription copied from interface:PointValues.IntersectVisitorCalled for all documents in a leaf cell that crosses the query. The consumer should scrutinize the packedValue to decide whether to accept it. In the 1D case, values are visited in increasing order, and in the case of ties, in increasing docID order.- Specified by:
visitin interfacePointValues.IntersectVisitor- Throws:
java.io.IOException
-
compare
public PointValues.Relation compare(byte[] minPackedValue, byte[] maxPackedValue)
Description copied from interface:PointValues.IntersectVisitorCalled for non-leaf cells to test how the cell relates to the query, to determine how to further recurse down the tree.- Specified by:
comparein interfacePointValues.IntersectVisitor
-
grow
public void grow(int count)
Description copied from interface:PointValues.IntersectVisitorNotifies the caller that this many documents are about to be visited- Specified by:
growin interfacePointValues.IntersectVisitor
-
-