Class NoopIndexingSpi
- java.lang.Object
-
- org.apache.ignite.spi.IgniteSpiAdapter
-
- org.apache.ignite.spi.indexing.noop.NoopIndexingSpi
-
- All Implemented Interfaces:
IgniteSpi,IndexingSpi
@IgniteSpiNoop public class NoopIndexingSpi extends IgniteSpiAdapter implements IndexingSpi
Default implementation ofIndexingSpiwhich does not index cache.
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.spi.IgniteSpiAdapter
ignite, igniteInstanceName, log
-
-
Constructor Summary
Constructors Constructor Description NoopIndexingSpi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<javax.cache.Cache.Entry<?,?>>query(@Nullable String cacheName, Collection<Object> params, @Nullable IndexingQueryFilter filters)Executes query.voidremove(@Nullable String cacheName, Object key)Removes index entry by key.NoopIndexingSpisetName(String name)Sets SPI name.voidspiStart(@Nullable String igniteInstanceName)This method is called to start SPI.voidspiStop()This method is called to stop SPI.voidstore(@Nullable String cacheName, Object key, Object val, long expirationTime)Updates index.-
Methods inherited from class org.apache.ignite.spi.IgniteSpiAdapter
addTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getLocalNode, getName, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, removeTimeoutObject, 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
-
-
-
-
Method Detail
-
query
public Iterator<javax.cache.Cache.Entry<?,?>> query(@Nullable @Nullable String cacheName, Collection<Object> params, @Nullable @Nullable IndexingQueryFilter filters) throws IgniteSpiException
Executes query.- Specified by:
queryin interfaceIndexingSpi- Parameters:
cacheName- Cache name.params- Query parameters.filters- System filters.- Returns:
- Query result. If the iterator implements
AutoCloseableit will be correctly closed. - Throws:
IgniteSpiException- If failed.
-
store
public void store(@Nullable @Nullable String cacheName, Object key, Object val, long expirationTime) throws IgniteSpiExceptionUpdates index. Note that key is unique for cache, so if cache contains multiple indexes the key should be removed from indexes other than one being updated.- Specified by:
storein interfaceIndexingSpi- Parameters:
cacheName- Cache name.key- Key.val- Value.expirationTime- Expiration time or 0 if never expires.- Throws:
IgniteSpiException- If failed.
-
remove
public void remove(@Nullable @Nullable String cacheName, Object key) throws IgniteSpiExceptionRemoves index entry by key.- Specified by:
removein interfaceIndexingSpi- Parameters:
cacheName- Cache name.key- Key.- Throws:
IgniteSpiException- If failed.
-
spiStart
public void spiStart(@Nullable @Nullable String igniteInstanceName) throws IgniteSpiExceptionThis method is called to start SPI. After this method returns successfully kernel assumes that SPI is fully operational.- Specified by:
spiStartin interfaceIgniteSpi- Parameters:
igniteInstanceName- Name of Ignite instance this SPI is being started for (nullfor default Ignite instance).- Throws:
IgniteSpiException- Throws in case of any error during SPI start.
-
spiStop
public void spiStop() throws IgniteSpiExceptionThis 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:
spiStopin interfaceIgniteSpi- Throws:
IgniteSpiException- Thrown in case of any error during SPI stop.
-
setName
public NoopIndexingSpi setName(String name)
Sets SPI name.- Overrides:
setNamein classIgniteSpiAdapter- Parameters:
name- SPI name.- Returns:
thisfor chaining.
-
-