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

## Class ClientInlineIndex

- java.lang.Object
- - org.apache.ignite.internal.cache.query.index.AbstractIndex
  - - org.apache.ignite.internal.cache.query.index.sorted.client.AbstractClientIndex
    - - org.apache.ignite.internal.cache.query.index.sorted.client.ClientInlineIndex

All Implemented Interfaces:
  Index, InlineIndex, SortedSegmentedIndex

    public class ClientInlineIndex
    extends AbstractClientIndex
    implements InlineIndex

We need indexes on non-affinity nodes. This index does not contain any data.

### Constructor Summary

Constructors
Constructor and Description
`ClientInlineIndex(IndexDefinition def, int inlineSize)`

### Method Summary

All Methods Instance Methods Concrete 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.
`boolean` `created()` `true` if index is created and `false` if it is restored from disk.
`GridCursor<IndexRow>` `find(IndexRow lower, IndexRow upper, boolean lowIncl, boolean upIncl, IndexQueryContext qryCtx)` Finds index rows by specified range in all tree segments with cache filtering.
`GridCursor<IndexRow>` `find(IndexRow lower, IndexRow upper, boolean lowIncl, boolean upIncl, 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>` `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.
`UUID` `id()` Unique ID.
`IndexDefinition` `indexDefinition()`
`int` `inlineSize()`
`String` `name()` Index name.
`InlineIndexTree` `segment(int segment)`
`int` `segmentsCount()` Returns amount of index tree segments.
`long` `totalCount()` Counts index rows for all segments.

### Methods inherited from class org.apache.ignite.internal.cache.query.index.sorted.client.AbstractClientIndex

`canHandle, destroy, onUpdate, unsupported`

### Methods inherited from class org.apache.ignite.internal.cache.query.index.AbstractIndex

`markIndexRebuild, rebuildInProgress, unwrap`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

`canHandle, destroy, onUpdate, unwrap`

### Constructor Detail

#### ClientInlineIndex

    public ClientInlineIndex(IndexDefinition def,
                             int inlineSize)

### Method Detail

#### inlineSize

    public int inlineSize()

Specified by:
  `inlineSize` in interface `InlineIndex`
Returns:
  amount of bytes to store inlined index keys.

#### created

    public boolean created()

`true` if index is created and `false` if it is restored from disk.

Specified by:
  `created` in interface `InlineIndex`

#### segment

    public InlineIndexTree segment(int segment)

Specified by:
  `segment` in interface `InlineIndex`
Parameters:
  `segment` - Number of tree segment.
Returns:
  Tree segment for specified number.

#### find

    public GridCursor<IndexRow> find(IndexRow lower,
                                     IndexRow upper,
                                     boolean lowIncl,
                                     boolean upIncl,
                                     int segment,
                                     IndexQueryContext qryCtx)

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

Specified by:
  `find` in interface `SortedSegmentedIndex`
Parameters:
  `lower` - Nullable lower bound.
  `upper` - Nullable upper bound.
  `lowIncl` - `true` for inclusive lower bound, otherwise `false`.
  `upIncl` - `true` for inclusive upper bound, otherwise `false`.
  `segment` - Number of tree segment to find.
  `qryCtx` - External index query context.
Returns:
  Cursor of found index rows.

#### find

    public GridCursor<IndexRow> find(IndexRow lower,
                                     IndexRow upper,
                                     boolean lowIncl,
                                     boolean upIncl,
                                     IndexQueryContext qryCtx)

Finds index rows by specified range in all tree segments with cache filtering. Range can be bound or unbound.

Specified by:
  `find` in interface `SortedSegmentedIndex`
Parameters:
  `lower` - Nullable lower bound.
  `upper` - Nullable upper bound.
  `lowIncl` - `true` for inclusive lower bound, otherwise `false`.
  `upIncl` - `true` for inclusive upper bound, otherwise `false`.
  `qryCtx` - External index query context.
Returns:
  Cursor of found index rows.

#### findFirst

    public GridCursor<IndexRow> findFirst(int segment,
                                          IndexQueryContext qryCtx)

Finds first index row for specified tree segment and cache filter.

Specified by:
  `findFirst` in interface `SortedSegmentedIndex`
Parameters:
  `segment` - Number of tree segment to find.
  `qryCtx` - External index qyery context.
Returns:
  Cursor of found index rows.

#### findLast

    public GridCursor<IndexRow> findLast(int segment,
                                         IndexQueryContext qryCtx)

Finds last index row for specified tree segment and cache filter.

Specified by:
  `findLast` in interface `SortedSegmentedIndex`
Parameters:
  `segment` - Number of tree segment to find.
  `qryCtx` - External index qyery context.
Returns:
  Cursor of found index rows.

#### findFirstOrLast

    public GridCursor<IndexRow> findFirstOrLast(IndexQueryContext qryCtx,
                                                boolean first)

Takes only one first or last index record.

Specified by:
  `findFirstOrLast` in interface `SortedSegmentedIndex`
Parameters:
  `qryCtx` - External index qyery context.
  `first` - `True` to take first index value. `False` to take last index value.

#### count

    public long count(int segment)

Counts index rows in specified tree segment.

Specified by:
  `count` in interface `SortedSegmentedIndex`
Parameters:
  `segment` - Number of tree segment to find.
Returns:
  count of index rows for specified segment.

#### totalCount

    public long totalCount()

Counts index rows for all segments.

Specified by:
  `totalCount` in interface `SortedSegmentedIndex`
Returns:
  total count of index rows.

#### count

    public long count(int segment,
                      IndexQueryContext qryCtx)

Counts index rows in specified tree segment with cache filter.

Specified by:
  `count` in interface `SortedSegmentedIndex`
Parameters:
  `segment` - Number of tree segment to find.
  `qryCtx` - Index query context.
Returns:
  count of index rows for specified segment.

#### segmentsCount

    public int segmentsCount()

Returns amount of index tree segments.

Specified by:
  `segmentsCount` in interface `SortedSegmentedIndex`
Returns:
  amount of index tree segments.

#### id

    public UUID id()

Unique ID.

Specified by:
  `id` in interface `Index`

#### name

    public String name()

Index name.

Specified by:
  `name` in interface `Index`

#### indexDefinition

    public IndexDefinition indexDefinition()

Specified by:
  `indexDefinition` in interface `InlineIndex`
Returns:
  Index definition.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023