Interface SortedSegmentedIndex
-
- All Superinterfaces:
Index
- All Known Subinterfaces:
InlineIndex
- All Known Implementing Classes:
InlineIndexImpl
public interface SortedSegmentedIndex extends Index
Interface for sorted and segmented Ignite indexes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longcount(int segment)Counts index rows in specified tree segment.longcount(int segment, IndexQueryContext qryCtx)Counts index rows in specified tree segment with cache filter.GridCursor<IndexRow>find(@Nullable IndexRow lower, @Nullable IndexRow upper, boolean lowerIncl, boolean upperIncl, int segment, IndexQueryContext qryCtx)Finds index rows by specified range in specifed tree segment with cache filtering.GridCursor<IndexRow>find(@Nullable IndexRow lower, @Nullable IndexRow upper, boolean lowerIncl, boolean upperIncl, IndexQueryContext qryCtx)Finds index rows by specified range in all tree segments with cache filtering.GridCursor<IndexRow>findFirst(int segment, IndexQueryContext qryCtx)Finds first index row for specified tree segment and cache filter.GridCursor<IndexRow>findFirstOrLast(IndexQueryContext qryCtx, boolean first)Takes only one first or last index record.GridCursor<IndexRow>findLast(int segment, IndexQueryContext qryCtx)Finds last index row for specified tree segment and cache filter.SortedIndexDefinitionindexDefinition()intsegmentsCount()Returns amount of index tree segments.longtotalCount()Counts index rows for all segments.
-
-
-
Method Detail
-
find
GridCursor<IndexRow> find(@Nullable @Nullable IndexRow lower, @Nullable @Nullable IndexRow upper, boolean lowerIncl, boolean upperIncl, int segment, IndexQueryContext qryCtx) throws IgniteCheckedException
Finds index rows by specified range in specifed tree segment with cache filtering. Range can be bound or unbound.- Parameters:
lower- Nullable lower bound.upper- Nullable upper bound.lowerIncl-truefor inclusive lower bound, otherwisefalse.upperIncl-truefor inclusive upper bound, otherwisefalse.segment- Number of tree segment to find.qryCtx- External index query context.- Returns:
- Cursor of found index rows.
- Throws:
IgniteCheckedException
-
find
GridCursor<IndexRow> find(@Nullable @Nullable IndexRow lower, @Nullable @Nullable IndexRow upper, boolean lowerIncl, boolean upperIncl, IndexQueryContext qryCtx) throws IgniteCheckedException
Finds index rows by specified range in all tree segments with cache filtering. Range can be bound or unbound.- Parameters:
lower- Nullable lower bound.upper- Nullable upper bound.lowerIncl-truefor inclusive lower bound, otherwisefalse.upperIncl-truefor inclusive upper bound, otherwisefalse.qryCtx- External index query context.- Returns:
- Cursor of found index rows.
- Throws:
IgniteCheckedException
-
findFirst
GridCursor<IndexRow> findFirst(int segment, IndexQueryContext qryCtx) throws IgniteCheckedException
Finds first index row for specified tree segment and cache filter.- Parameters:
segment- Number of tree segment to find.qryCtx- External index qyery context.- Returns:
- Cursor of found index rows.
- Throws:
IgniteCheckedException
-
findLast
GridCursor<IndexRow> findLast(int segment, IndexQueryContext qryCtx) throws IgniteCheckedException
Finds last index row for specified tree segment and cache filter.- Parameters:
segment- Number of tree segment to find.qryCtx- External index qyery context.- Returns:
- Cursor of found index rows.
- Throws:
IgniteCheckedException
-
findFirstOrLast
GridCursor<IndexRow> findFirstOrLast(IndexQueryContext qryCtx, boolean first) throws IgniteCheckedException
Takes only one first or last index record.- Parameters:
qryCtx- External index qyery context.first-Trueto take first index value.Falseto take last index value.- Throws:
IgniteCheckedException
-
count
long count(int segment) throws IgniteCheckedExceptionCounts index rows in specified tree segment.- Parameters:
segment- Number of tree segment to find.- Returns:
- count of index rows for specified segment.
- Throws:
IgniteCheckedException
-
count
long count(int segment, IndexQueryContext qryCtx) throws IgniteCheckedExceptionCounts index rows in specified tree segment with cache filter.- Parameters:
segment- Number of tree segment to find.qryCtx- Index query context.- Returns:
- count of index rows for specified segment.
- Throws:
IgniteCheckedException
-
totalCount
long totalCount() throws IgniteCheckedExceptionCounts index rows for all segments.- Returns:
- total count of index rows.
- Throws:
IgniteCheckedException
-
segmentsCount
int segmentsCount()
Returns amount of index tree segments.- Returns:
- amount of index tree segments.
-
indexDefinition
SortedIndexDefinition indexDefinition()
- Specified by:
indexDefinitionin interfaceIndex- Returns:
- Index definition.
-
-