use of org.apache.ignite.internal.util.IgniteTree in project ignite by apache.
the class GridH2TreeIndex method doFind.
/**
* Returns sub-tree bounded by given values.
*
* @param first Lower bound.
* @param includeFirst Whether lower bound should be inclusive.
* @param last Upper bound always inclusive.
* @return Iterator over rows in given range.
*/
@SuppressWarnings("unchecked")
private GridCursor<GridH2Row> doFind(@Nullable SearchRow first, boolean includeFirst, @Nullable SearchRow last) {
int seg = threadLocalSegment();
IgniteTree t = treeForRead(seg);
return doFind0(t, first, includeFirst, last, threadLocalFilter());
}
use of org.apache.ignite.internal.util.IgniteTree in project ignite by apache.
the class GridH2TreeIndex method findFirstOrLast.
/** {@inheritDoc} */
@Override
public Cursor findFirstOrLast(Session ses, boolean first) {
try {
int seg = threadLocalSegment();
IgniteTree t = treeForRead(seg);
GridH2Row row = (GridH2Row) (first ? t.findFirst() : t.findLast());
return new SingleRowCursor(row);
} catch (IgniteCheckedException e) {
throw DbException.convert(e);
}
}
Aggregations