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

## Interface Index

All Known Subinterfaces:
  InlineIndex, SortedSegmentedIndex

All Known Implementing Classes:
  AbstractClientIndex, AbstractIndex, ClientInlineIndex, InlineIndexImpl

    public interface Index

Basic interface for Ignite indexes.

### Method Summary

All Methods Instance Methods Abstract Methods
`boolean` `canHandle(CacheDataRow row)` Checks whether index handles specified cache row.
`void` `destroy(boolean softDelete)` Destroy index.
`UUID` `id()` Unique ID.
`String` `name()` Index name.
`void` `onUpdate(@Nullable CacheDataRow oldRow, @Nullable CacheDataRow newRow, boolean prevRowAvailable)` Callback that runs when the underlying cache is updated.
`<T extends Index> T` `unwrap(Class<T> clazz)` Provides a standard way to access the underlying concrete index implementation to provide access to further, proprietary features.

### Method Detail

#### id

    UUID id()

Unique ID.

#### name

    String name()

Index name.

#### canHandle

    boolean canHandle(CacheDataRow row)
               throws IgniteCheckedException

Checks whether index handles specified cache row.

Parameters:
  `row` - Cache row.
Returns:
  Whether index handles specified cache row
Throws:
  `IgniteCheckedException`

#### onUpdate

    void onUpdate(@Nullable
                  @Nullable CacheDataRow oldRow,
                  @Nullable
                  @Nullable CacheDataRow newRow,
                  boolean prevRowAvailable)
           throws IgniteCheckedException

Callback that runs when the underlying cache is updated.

Parameters:
  `oldRow` - Cache row that was replaced with newRow.
  `newRow` - Cache row that was stored.
  `prevRowAvailable` - Whether oldRow available.
Throws:
  `IgniteCheckedException`

#### unwrap

    <T extends Index> T unwrap(Class<T> clazz)

Provides a standard way to access the underlying concrete index implementation to provide access to further, proprietary features.

#### destroy

    void destroy(boolean softDelete)

Destroy index.

Parameters:
  `softDelete` - if `true` then perform logical deletion.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023