Package org.apache.jackrabbit.oak.query
Class FilterIterators
- java.lang.Object
-
- org.apache.jackrabbit.oak.query.FilterIterators
-
public class FilterIterators extends Object
Filtering iterators that are useful for queries with limit, offset, order by, or distinct.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkMemoryLimit(long count, QueryLimits settings)
Verify the number of in-memory nodes is below the limit.static void
checkReadLimit(long count, QueryLimits settings)
Verify the number of node read operations is below the limit.static <K> Iterator<K>
newCombinedFilter(Iterator<K> it, boolean distinct, long limit, long offset, Comparator<K> orderBy, QueryLimits settings)
static <K> org.apache.jackrabbit.oak.query.FilterIterators.DistinctIterator<K>
newDistinct(Iterator<K> it, QueryLimits settings)
static <K> Iterator<K>
newLimit(Iterator<K> it, long limit)
static <K> Iterator<K>
newOffset(Iterator<K> it, long offset)
static <K> Iterator<K>
newSort(Iterator<K> it, Comparator<K> orderBy, int max, QueryLimits settings)
-
-
-
Method Detail
-
checkMemoryLimit
public static void checkMemoryLimit(long count, QueryLimits settings)
Verify the number of in-memory nodes is below the limit.- Parameters:
count
- the number of nodessettings
- the query engine settings- Throws:
UnsupportedOperationException
- if the limit was exceeded
-
checkReadLimit
public static void checkReadLimit(long count, QueryLimits settings)
Verify the number of node read operations is below the limit.- Parameters:
count
- the number of read operationssettings
- the query engine settings- Throws:
RuntimeNodeTraversalException
- if the limit was exceeded
-
newCombinedFilter
public static <K> Iterator<K> newCombinedFilter(Iterator<K> it, boolean distinct, long limit, long offset, Comparator<K> orderBy, QueryLimits settings)
-
newDistinct
public static <K> org.apache.jackrabbit.oak.query.FilterIterators.DistinctIterator<K> newDistinct(Iterator<K> it, QueryLimits settings)
-
newSort
public static <K> Iterator<K> newSort(Iterator<K> it, Comparator<K> orderBy, int max, QueryLimits settings)
-
-