public interface IndexingSpi extends IgniteSpi
NOTE: this SPI (i.e. methods in this interface) should never be used directly. SPIs provide
internal view on the subsystem and is used internally by Ignite kernal. In rare use cases when
access to a specific implementation of this SPI is required - an instance of this SPI can be obtained
via Ignite.configuration()
method to check its configuration properties or call other non-SPI
methods. Note again that calling methods from this interface on the obtained instance can lead
to undefined behavior and explicitly not supported.
NOTE: Key and value arguments of IgniteSpi methods can be BinaryObject
instances.
BinaryObjects can be deserialized manually if original objects needed.
Here is a Java example on how to configure SPI.
IndexingSpi spi = new MyIndexingSpi(); IgniteConfiguration cfg = new IgniteConfiguration(); // Overrides default indexing SPI. cfg.setIndexingSpi(spi); // Starts grid. Ignition.start(cfg);Here is an example of how to configure SPI from Spring XML configuration file.
<property name="indexingSpi"> <bean class="com.example.MyIndexingSpi"> </bean> </property>
For information about Spring framework visit www.springframework.org
Modifier and Type | Method and Description |
---|---|
Iterator<javax.cache.Cache.Entry<?,?>> |
query(@Nullable String cacheName,
Collection<Object> params,
@Nullable IndexingQueryFilter filters)
Executes query.
|
void |
remove(@Nullable String cacheName,
Object key)
Removes index entry by key.
|
void |
store(@Nullable String cacheName,
Object key,
Object val,
long expirationTime)
Updates index.
|
getName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized, spiStart, spiStop
Iterator<javax.cache.Cache.Entry<?,?>> query(@Nullable @Nullable String cacheName, Collection<Object> params, @Nullable @Nullable IndexingQueryFilter filters) throws IgniteSpiException
cacheName
- Cache name.params
- Query parameters.filters
- System filters.AutoCloseable
it will be correctly closed.IgniteSpiException
- If failed.void store(@Nullable @Nullable String cacheName, Object key, Object val, long expirationTime) throws IgniteSpiException
cacheName
- Cache name.key
- Key.val
- Value.expirationTime
- Expiration time or 0 if never expires.IgniteSpiException
- If failed.void remove(@Nullable @Nullable String cacheName, Object key) throws IgniteSpiException
cacheName
- Cache name.key
- Key.IgniteSpiException
- If failed.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023