org.apache.ignite.spi.indexing.noop

## Class NoopIndexingSpi

- java.lang.Object
- - org.apache.ignite.spi.IgniteSpiAdapter
  - - org.apache.ignite.spi.indexing.noop.NoopIndexingSpi

All Implemented Interfaces:
  IgniteSpi, IgniteSpiManagementMBean, IndexingSpi

    @IgniteSpiNoop
    public class NoopIndexingSpi
    extends IgniteSpiAdapter
    implements IndexingSpi

Default implementation of `IndexingSpi` which does not index cache.

### Field Summary

### Fields inherited from class org.apache.ignite.spi.IgniteSpiAdapter

`gridName, ignite`

### Constructor Summary

Constructors
Constructor and Description
`NoopIndexingSpi()`

### Method Summary

Methods
`void` `onSwap(String spaceName, Object key)` Will be called when entry with given key is swapped.
`void` `onUnswap(String spaceName, Object key, Object val)` Will be called when entry with given key is unswapped.
`Iterator<javax.cache.Cache.Entry<?,?>>` `query(String spaceName, Collection<Object> params, IndexingQueryFilter filters)` Executes query.
`void` `remove(String spaceName, Object key)` Removes index entry by key.
`void` `spiStart(String gridName)` This method is called to start SPI.
`void` `spiStop()` This method is called to stop SPI.
`void` `store(String spaceName, Object key, Object val, long expirationTime)` Updates index.

### Methods inherited from class org.apache.ignite.spi.IgniteSpiAdapter

`addTimeoutObject, assertParameter, checkConfigurationConsistency0, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getIgniteHome, getLocalNode, getLocalNodeId, getName, getNodeAttributes, getSpiContext, getStartTimestamp, getStartTimestampFormatted, getUpTime, getUpTimeFormatted, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, removeTimeoutObject, setName, started, startInfo, startStopwatch, stopInfo, unregisterMBean`

### 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.spi.IgniteSpi

`getName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized`

### Constructor Detail

#### NoopIndexingSpi

    public NoopIndexingSpi()

### Method Detail

#### query

    public Iterator<javax.cache.Cache.Entry<?,?>> query(@Nullable
                                               String spaceName,
                                               Collection<Object> params,
                                               @Nullable
                                               IndexingQueryFilter filters)
                                                 throws IgniteSpiException

Executes query.

Specified by:
  `query` in interface `IndexingSpi`
Parameters:
  `spaceName` - Space name.
  `params` - Query parameters.
  `filters` - System filters.
Returns:
  Query result. If the iterator implements `AutoCloseable` it will be correctly closed.
Throws:
  `IgniteSpiException` - If failed.

#### store

    public void store(@Nullable
             String spaceName,
             Object key,
             Object val,
             long expirationTime)
               throws IgniteSpiException

Updates index. Note that key is unique for space, so if space contains multiple indexes the key should be removed from indexes other than one being updated.

Specified by:
  `store` in interface `IndexingSpi`
Parameters:
  `spaceName` - Space name.
  `key` - Key.
  `val` - Value.
  `expirationTime` - Expiration time or 0 if never expires.
Throws:
  `IgniteSpiException` - If failed.

#### remove

    public void remove(@Nullable
              String spaceName,
              Object key)
                throws IgniteSpiException

Removes index entry by key.

Specified by:
  `remove` in interface `IndexingSpi`
Parameters:
  `spaceName` - Space name.
  `key` - Key.
Throws:
  `IgniteSpiException` - If failed.

#### onSwap

    public void onSwap(@Nullable
              String spaceName,
              Object key)
                throws IgniteSpiException

Will be called when entry with given key is swapped.

Specified by:
  `onSwap` in interface `IndexingSpi`
Parameters:
  `spaceName` - Space name.
  `key` - Key.
Throws:
  `IgniteSpiException` - If failed.

#### onUnswap

    public void onUnswap(@Nullable
                String spaceName,
                Object key,
                Object val)
                  throws IgniteSpiException

Will be called when entry with given key is unswapped.

Specified by:
  `onUnswap` in interface `IndexingSpi`
Parameters:
  `spaceName` - Space name.
  `key` - Key.
  `val` - Value.
Throws:
  `IgniteSpiException` - If failed.

#### spiStart

    public void spiStart(@Nullable
                String gridName)
                  throws IgniteSpiException

This method is called to start SPI. After this method returns successfully kernel assumes that SPI is fully operational.

Specified by:
  `spiStart` in interface `IgniteSpi`
Parameters:
  `gridName` - Name of grid instance this SPI is being started for (`null` for default grid).
Throws:
  `IgniteSpiException` - Throws in case of any error during SPI start.

#### spiStop

    public void spiStop()
                 throws IgniteSpiException

This method is called to stop SPI. After this method returns kernel assumes that this SPI is finished and all resources acquired by it are released.

Note that this method can be called at any point including during recovery of failed start. It should make no assumptions on what state SPI will be in when this method is called.

Specified by:
  `spiStop` in interface `IgniteSpi`
Throws:
  `IgniteSpiException` - Thrown in case of any error during SPI stop.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.7.0
Release Date | : August 1 2016