Class Cursors
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.Cursors
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Cursors.AbstractCursor
A Cursor implementation where the remove method throws an UnsupportedOperationException.static class
Cursors.PathCursor
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkMemoryLimit(long count, QueryLimits settings)
static void
checkReadLimit(long count, QueryLimits settings)
static Cursor
newAncestorCursor(Cursor c, int level, QueryLimits settings)
Returns a cursor wrapper, which returns the ancestor rows at the givenlevel
of the wrapped cursorc
.static Cursor
newConcatCursor(List<Cursor> cursors, QueryLimits settings)
static Cursor
newIntersectionCursor(Cursor a, Cursor b, QueryLimits settings)
static Cursor
newPathCursor(Iterable<String> paths, QueryLimits settings)
Creates aCursor
over paths.static Cursor
newPathCursorDistinct(Iterable<String> paths, QueryLimits settings)
Creates aCursor
over paths, and make the result distinct.static Cursor
newTraversingCursor(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 aCursor
over 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 aCursor
over 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 givenlevel
of the wrapped cursorc
. Withlevel
e.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
c
atlevel
.
-
-