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

## Interface IndexRowComparator

All Known Implementing Classes:
  IndexRowComparatorImpl

    public interface IndexRowComparator

Comparator for index rows.

### Method Summary

All Methods Instance Methods Abstract Methods
`int` `compareKey(IndexKey left, IndexKey right)` Compare index keys.
`int` `compareKey(long pageAddr, int off, int maxSize, IndexKey key, InlineIndexKeyType type)` Compare inlined index key with specified key.
`int` `compareRow(IndexRow left, IndexRow right, int idx)` Compare index rows by key specified with `idx`.

### Method Detail

#### compareKey

    int compareKey(long pageAddr,
                   int off,
                   int maxSize,
                   IndexKey key,
                   InlineIndexKeyType type)
            throws IgniteCheckedException

Compare inlined index key with specified key. If it is impossible to compare inlined key, it returns special vals: `COMPARE_UNSUPPORTED` and `CANT_BE_COMPARE`, see `NullableInlineIndexKeyType`.

Parameters:
  `pageAddr` - address of an index row.
  `off` - offset of an index key.
  `maxSize` - max size to read.
  `key` - key to compare with.
  `type` - inline type of index key.
Throws:
  `IgniteCheckedException`

#### compareKey

    int compareKey(IndexKey left,
                   IndexKey right)
            throws IgniteCheckedException

Compare index keys.

Parameters:
  `left` - index key.
  `right` - index key.
Throws:
  `IgniteCheckedException`

#### compareRow

    int compareRow(IndexRow left,
                   IndexRow right,
                   int idx)
            throws IgniteCheckedException

Compare index rows by key specified with `idx`.

Parameters:
  `left` - index row.
  `right` - index row.
  `idx` - offset of index key.
Throws:
  `IgniteCheckedException`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

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