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

## Class IndexRowImpl

- java.lang.Object
- - org.apache.ignite.internal.cache.query.index.sorted.IndexRowImpl

All Implemented Interfaces:
  IndexRow, MvccVersionAware

Direct Known Subclasses:
  DefragIndexFactory.DefragIndexRowImpl

    public class IndexRowImpl
    extends Object
    implements IndexRow

This class represents a row in `SortedSegmentedIndex`.

### Constructor Summary

Constructors
Constructor and Description
`IndexRowImpl(InlineIndexRowHandler rowHnd, CacheDataRow row)` Constructor.
`IndexRowImpl(InlineIndexRowHandler rowHnd, CacheDataRow row, IndexKey[] keys)` Constructor with prefilling of keys cache.

### Method Summary

All Methods Instance Methods Concrete Methods
`CacheDataRow` `cacheDataRow()`
`int` `cacheId()`
`boolean` `indexSearchRow()`
`IndexKey` `key(int idx)`
`IndexKey[]` `keys()`
`long` `link()`
`long` `mvccCoordinatorVersion()`
`long` `mvccCounter()`
`int` `mvccOperationCounter()`
`byte` `mvccTxState()`
`void` `prepareCache()` Initialize a cache for index keys.
`InlineIndexRowHandler` `rowHandler()`
`String` `toString()`
`CacheObject` `value()`

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

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

### Methods inherited from interface org.apache.ignite.internal.processors.cache.mvcc.MvccVersionAware

`mvccVersion, mvccVersion, mvccVersion, mvccVersion`

### Constructor Detail

#### IndexRowImpl

    public IndexRowImpl(InlineIndexRowHandler rowHnd,
                        CacheDataRow row)

Constructor.

#### IndexRowImpl

    public IndexRowImpl(InlineIndexRowHandler rowHnd,
                        CacheDataRow row,
                        IndexKey[] keys)

Constructor with prefilling of keys cache.

### Method Detail

#### value

    public CacheObject value()

Returns:
  Indexed value.

#### key

    public IndexKey key(int idx)

Specified by:
  `key` in interface `IndexRow`
Parameters:
  `idx` - Index of a key.
Returns:
  Underlying key by specified index.

#### keys

    public IndexKey[] keys()

Specified by:
  `keys` in interface `IndexRow`
Returns:
  Underlying keys.

#### link

    public long link()

Specified by:
  `link` in interface `IndexRow`
Returns:
  Link to a cache row.

#### rowHandler

    public InlineIndexRowHandler rowHandler()

Specified by:
  `rowHandler` in interface `IndexRow`
Returns:
  Schema of an index.

#### cacheDataRow

    public CacheDataRow cacheDataRow()

Specified by:
  `cacheDataRow` in interface `IndexRow`
Returns:
  Cache row.

#### cacheId

    public int cacheId()

Returns:
  Cache ID or `0` if cache ID is not defined.

#### prepareCache

    public void prepareCache()

Initialize a cache for index keys. Useful for inserting rows as there are a lot of comparisons.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### mvccCoordinatorVersion

    public long mvccCoordinatorVersion()

Specified by:
  `mvccCoordinatorVersion` in interface `IndexRow`
Specified by:
  `mvccCoordinatorVersion` in interface `MvccVersionAware`
Returns:
  Mvcc coordinator version.

#### mvccCounter

    public long mvccCounter()

Specified by:
  `mvccCounter` in interface `IndexRow`
Specified by:
  `mvccCounter` in interface `MvccVersionAware`
Returns:
  Mvcc counter.

#### mvccOperationCounter

    public int mvccOperationCounter()

Specified by:
  `mvccOperationCounter` in interface `IndexRow`
Specified by:
  `mvccOperationCounter` in interface `MvccVersionAware`
Returns:
  Mvcc operation counter.

#### mvccTxState

    public byte mvccTxState()

Specified by:
  `mvccTxState` in interface `IndexRow`
Specified by:
  `mvccTxState` in interface `MvccVersionAware`
Returns:
  Tx state hint for 'created' mvcc version.

#### indexSearchRow

    public boolean indexSearchRow()

Specified by:
  `indexSearchRow` in interface `IndexRow`
Returns:
  `True` for rows used for index search (as opposed to rows stored in `InlineIndexTree`.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.14.0
Release Date | : September 29 2022