Class Cursors
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.Cursors
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCursors.AbstractCursorA Cursor implementation where the remove method throws an UnsupportedOperationException.static classCursors.PathCursor
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckMemoryLimit(long count, QueryLimits settings)static voidcheckReadLimit(long count, QueryLimits settings)static CursornewAncestorCursor(Cursor c, int level, QueryLimits settings)Returns a cursor wrapper, which returns the ancestor rows at the givenlevelof the wrapped cursorc.static CursornewConcatCursor(List<Cursor> cursors, QueryLimits settings)static CursornewIntersectionCursor(Cursor a, Cursor b, QueryLimits settings)static CursornewPathCursor(Iterable<String> paths, QueryLimits settings)Creates aCursorover paths.static CursornewPathCursorDistinct(Iterable<String> paths, QueryLimits settings)Creates aCursorover paths, and make the result distinct.static CursornewTraversingCursor(Filter filter, NodeState rootState)Returns a traversing cursor based on the path restriction in the givenFilter.
-
-
-
Method Detail
-
checkMemoryLimit
public static void checkMemoryLimit(long count, QueryLimits settings)
-
checkReadLimit
public static void checkReadLimit(long count, QueryLimits settings)
-
newIntersectionCursor
public static Cursor newIntersectionCursor(Cursor a, Cursor b, QueryLimits settings)
-
newConcatCursor
public static Cursor newConcatCursor(List<Cursor> cursors, QueryLimits settings)
-
newPathCursor
public static Cursor newPathCursor(Iterable<String> paths, QueryLimits settings)
Creates aCursorover paths.- Parameters:
paths- the paths to iterate over (must return distinct paths)- Returns:
- the Cursor.
-
newPathCursorDistinct
public static Cursor newPathCursorDistinct(Iterable<String> paths, QueryLimits settings)
Creates aCursorover paths, and make the result distinct. The iterator might return duplicate paths- Parameters:
paths- the paths to iterate over (might contain duplicate entries)- Returns:
- the Cursor.
-
newTraversingCursor
public static Cursor newTraversingCursor(Filter filter, NodeState rootState)
Returns a traversing cursor based on the path restriction in the givenFilter.
-
newAncestorCursor
public static Cursor newAncestorCursor(Cursor c, int level, QueryLimits settings)
Returns a cursor wrapper, which returns the ancestor rows at the givenlevelof the wrapped cursorc. Withlevele.g. set to1, the returned cursor iterates over the parent rows of the passed cursorc. The returned cursor guarantees distinct rows.- Parameters:
c- the cursor to wrap.level- the ancestor level. Must be>= 1.- Returns:
- cursor over the ancestors of
catlevel.
-
-