Package org.apache.lucene.index
Class ExitableDirectoryReader.ExitablePointTree
- java.lang.Object
-
- org.apache.lucene.index.ExitableDirectoryReader.ExitablePointTree
-
- All Implemented Interfaces:
java.lang.Cloneable,PointValues.PointTree
- Enclosing class:
- ExitableDirectoryReader
private static class ExitableDirectoryReader.ExitablePointTree extends java.lang.Object implements PointValues.PointTree
-
-
Field Summary
Fields Modifier and Type Field Description private intcallsprivate ExitableDirectoryReader.ExitableIntersectVisitorexitableIntersectVisitorprivate PointValues.PointTreeinprivate static intMAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECKprivate PointValuespointValuesprivate QueryTimeoutqueryTimeout
-
Constructor Summary
Constructors Modifier Constructor Description privateExitablePointTree(PointValues pointValues, PointValues.PointTree 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.PointTreeclone()Clone, the current node becomes the root of the new tree.byte[]getMaxPackedValue()Return the maximum packed value of the current node.byte[]getMinPackedValue()Return the minimum packed value of the current node.booleanmoveToChild()Move to the first child node and returntrueupon success.booleanmoveToParent()Move to the parent node and returntrueupon success.booleanmoveToSibling()Move to the next sibling node and returntrueupon success.longsize()Return the number of points below the current node.voidvisitDocIDs(PointValues.IntersectVisitor visitor)Visit all the docs below the current node.voidvisitDocValues(PointValues.IntersectVisitor visitor)Visit all the docs and values below the current node.
-
-
-
Field Detail
-
MAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECK
private static final int MAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECK
- See Also:
- Constant Field Values
-
pointValues
private final PointValues pointValues
-
in
private final PointValues.PointTree in
-
exitableIntersectVisitor
private final ExitableDirectoryReader.ExitableIntersectVisitor exitableIntersectVisitor
-
queryTimeout
private final QueryTimeout queryTimeout
-
calls
private int calls
-
-
Constructor Detail
-
ExitablePointTree
private ExitablePointTree(PointValues pointValues, PointValues.PointTree in, QueryTimeout queryTimeout)
-
-
Method Detail
-
checkAndThrowWithSampling
private void checkAndThrowWithSampling()
ThrowsExitableDirectoryReader.ExitingReaderExceptionifQueryTimeout.shouldExit()returns true, or ifThread.interrupted()returns true.
-
checkAndThrow
private void checkAndThrow()
-
clone
public PointValues.PointTree clone()
Description copied from interface:PointValues.PointTreeClone, the current node becomes the root of the new tree.- Specified by:
clonein interfacePointValues.PointTree- Overrides:
clonein classjava.lang.Object
-
moveToChild
public boolean moveToChild() throws java.io.IOExceptionDescription copied from interface:PointValues.PointTreeMove to the first child node and returntrueupon success. Returnsfalsefor leaf nodes andtrueotherwise.- Specified by:
moveToChildin interfacePointValues.PointTree- Throws:
java.io.IOException
-
moveToSibling
public boolean moveToSibling() throws java.io.IOExceptionDescription copied from interface:PointValues.PointTreeMove to the next sibling node and returntrueupon success. Returnsfalseif the current node has no more siblings.- Specified by:
moveToSiblingin interfacePointValues.PointTree- Throws:
java.io.IOException
-
moveToParent
public boolean moveToParent() throws java.io.IOExceptionDescription copied from interface:PointValues.PointTreeMove to the parent node and returntrueupon success. Returnsfalsefor the root node andtrueotherwise.- Specified by:
moveToParentin interfacePointValues.PointTree- Throws:
java.io.IOException
-
getMinPackedValue
public byte[] getMinPackedValue()
Description copied from interface:PointValues.PointTreeReturn the minimum packed value of the current node.- Specified by:
getMinPackedValuein interfacePointValues.PointTree
-
getMaxPackedValue
public byte[] getMaxPackedValue()
Description copied from interface:PointValues.PointTreeReturn the maximum packed value of the current node.- Specified by:
getMaxPackedValuein interfacePointValues.PointTree
-
size
public long size()
Description copied from interface:PointValues.PointTreeReturn the number of points below the current node.- Specified by:
sizein interfacePointValues.PointTree
-
visitDocIDs
public void visitDocIDs(PointValues.IntersectVisitor visitor) throws java.io.IOException
Description copied from interface:PointValues.PointTreeVisit all the docs below the current node.- Specified by:
visitDocIDsin interfacePointValues.PointTree- Throws:
java.io.IOException
-
visitDocValues
public void visitDocValues(PointValues.IntersectVisitor visitor) throws java.io.IOException
Description copied from interface:PointValues.PointTreeVisit all the docs and values below the current node.- Specified by:
visitDocValuesin interfacePointValues.PointTree- Throws:
java.io.IOException
-
-