org.apache.ignite.internal.cache.query.index.sorted

## 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
`long` `count(int segment)` Counts index rows in specified tree segment.
`long` `count(int segment, IndexQueryContext qryCtx)` Counts index rows in specified tree segment with cache filter.
`GridCursor<IndexRow>` `find(@Nullable IndexRow lower, @Nullable IndexRow upper, int segment)` Finds index rows by specified range in specified tree segment.
`GridCursor<IndexRow>` `find(IndexRow lower, IndexRow upper, int segment, IndexQueryContext qryCtx)` Finds index rows by specified range in specifed tree segment with cache filtering.
`GridCursor<IndexRow>` `findFirst(int segment, IndexQueryContext qryCtx)` Finds first index row for specified tree segment and cache filter.
`GridCursor<IndexRow>` `findLast(int segment, IndexQueryContext qryCtx)` Finds last index row for specified tree segment and cache filter.
`int` `segmentsCount()` Returns amount of index tree segments.
`long` `totalCount()` Counts index rows for all segments.

### Methods inherited from interface org.apache.ignite.internal.cache.query.index.Index

`canHandle, destroy, id, name, onUpdate, unwrap`

### Method Detail

#### find

    GridCursor<IndexRow> find(@Nullable
                              @Nullable IndexRow lower,
                              @Nullable
                              @Nullable IndexRow upper,
                              int segment)
                       throws IgniteCheckedException

Finds index rows by specified range in specified tree segment. Range can be bound or unbound.

Parameters:
  `lower` - Nullable lower bound.
  `upper` - Nullable upper bound.
  `segment` - Number of tree segment to find.
Returns:
  Cursor of found index rows.
Throws:
  `IgniteCheckedException`

#### find

    GridCursor<IndexRow> find(IndexRow lower,
                              IndexRow upper,
                              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.
  `segment` - Number of tree segment to find.
  `qryCtx` - External index qyery 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`

#### count

    long count(int segment)
        throws IgniteCheckedException

Counts 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 IgniteCheckedException

Counts 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 IgniteCheckedException

Counts 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.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.1
Release Date | : December 20 2021