@GridSpiNoop public class GridNoopIndexingSpi extends GridSpiAdapter implements GridIndexingSpi
GridIndexingSpi, throws exception on query attempt.| Constructor and Description |
|---|
GridNoopIndexingSpi() |
| Modifier and Type | Method and Description |
|---|---|
<K> void |
onSwap(String spaceName,
String swapSpaceName,
K key)
Will be called when entry with given key is swapped.
|
<K,V> void |
onUnswap(String spaceName,
K key,
V val,
byte[] valBytes)
Will be called when entry with given key is unswapped.
|
<K,V> GridSpiCloseableIterator<GridIndexingKeyValueRow<K,V>> |
query(String spaceName,
String qry,
Collection<Object> params,
GridIndexingTypeDescriptor type,
GridIndexingQueryFilter<K,V>... filters)
Executes regular query.
|
<K,V> GridIndexingFieldsResult |
queryFields(String spaceName,
String qry,
Collection<Object> params,
GridIndexingQueryFilter<K,V>... filters)
Queries individual fields (generally used by JDBC drivers).
|
<K,V> GridSpiCloseableIterator<GridIndexingKeyValueRow<K,V>> |
queryText(String spaceName,
String qry,
GridIndexingTypeDescriptor type,
GridIndexingQueryFilter<K,V>... filters)
Executes text query.
|
void |
rebuildIndexes(String spaceName,
GridIndexingTypeDescriptor type)
Rebuilds all indexes of given type.
|
void |
registerMarshaller(GridIndexingMarshaller marshaller)
Marshaller to be used by SPI.
|
void |
registerSpace(String spaceName)
Registers space in this SPI.
|
boolean |
registerType(String spaceName,
GridIndexingTypeDescriptor desc)
Registers type if it was not known before or updates it otherwise.
|
<K> boolean |
remove(String spaceName,
GridIndexingEntity<K> key)
Removes index entry by key.
|
long |
size(String spaceName,
GridIndexingTypeDescriptor desc)
Gets size of index for given type or -1 if it is a unknown type.
|
void |
spiStart(String gridName)
This method is called to start SPI.
|
void |
spiStop()
This method is called to stop SPI.
|
<K,V> void |
store(String spaceName,
GridIndexingTypeDescriptor type,
GridIndexingEntity<K> key,
GridIndexingEntity<V> val,
byte[] ver,
long expirationTime)
Updates index.
|
void |
unregisterType(String spaceName,
GridIndexingTypeDescriptor type)
Unregisters type and removes all corresponding data.
|
assertParameter, checkConfigurationConsistency0, configInfo, createSpiAttributeName, getConsistentAttributeNames, getGridGainHome, getLocalNodeId, getName, getNodeAttributes, getSpiContext, getStartTimestamp, getStartTimestampFormatted, getUpTime, getUpTimeFormatted, injectables, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, setName, startInfo, startStopwatch, stopInfo, unregisterMBeanclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getNodeAttributes, onContextDestroyed, onContextInitializedpublic <K,V> GridIndexingFieldsResult queryFields(@Nullable String spaceName, String qry, Collection<Object> params, GridIndexingQueryFilter<K,V>... filters) throws GridSpiException
queryFields in interface GridIndexingSpispaceName - Space name.qry - Query.params - Query parameters.filters - Space name and key filters.GridSpiException - If failed.public <K,V> GridSpiCloseableIterator<GridIndexingKeyValueRow<K,V>> query(@Nullable String spaceName, String qry, Collection<Object> params, GridIndexingTypeDescriptor type, GridIndexingQueryFilter<K,V>... filters) throws GridSpiException
query in interface GridIndexingSpispaceName - Space name.qry - Query.params - Query parameters.type - Query return type.filters - Space name and key filters.GridSpiException - If failed.public <K,V> GridSpiCloseableIterator<GridIndexingKeyValueRow<K,V>> queryText(@Nullable String spaceName, String qry, GridIndexingTypeDescriptor type, GridIndexingQueryFilter<K,V>... filters) throws GridSpiException
queryText in interface GridIndexingSpispaceName - Space name.qry - Text query.type - Query return type.filters - Space name and key filter.GridSpiException - If failed.public long size(@Nullable String spaceName, GridIndexingTypeDescriptor desc) throws GridSpiException
size in interface GridIndexingSpispaceName - Space name.desc - Type descriptor.GridSpiException - If failed.public boolean registerType(@Nullable String spaceName, GridIndexingTypeDescriptor desc) throws GridSpiException
registerType in interface GridIndexingSpispaceName - Space name.desc - Type descriptor.True if type was registered, false if for some reason it was rejected.GridSpiException - If failed.public void unregisterType(@Nullable String spaceName, GridIndexingTypeDescriptor type) throws GridSpiException
unregisterType in interface GridIndexingSpispaceName - Space name.type - Type descriptor.GridSpiException - If failed.public <K,V> void store(@Nullable String spaceName, GridIndexingTypeDescriptor type, GridIndexingEntity<K> key, GridIndexingEntity<V> val, byte[] ver, long expirationTime) throws GridSpiException
store in interface GridIndexingSpispaceName - Space name.type - Value type.key - Key.val - Value.ver - Version.expirationTime - Expiration time or 0 if never expires.GridSpiException - If failed.public <K> boolean remove(@Nullable String spaceName, GridIndexingEntity<K> key) throws GridSpiException
remove in interface GridIndexingSpispaceName - Space name.key - Key.True if removed by this operation, false otherwise.GridSpiException - If failed.public <K> void onSwap(@Nullable String spaceName, String swapSpaceName, K key) throws GridSpiException
onSwap in interface GridIndexingSpispaceName - Space name.swapSpaceName - Swap space name.key - Key.GridSpiException - If failed.public <K,V> void onUnswap(@Nullable String spaceName, K key, V val, byte[] valBytes) throws GridSpiException
onUnswap in interface GridIndexingSpispaceName - Space name.key - Key.val - Value.valBytes - Value bytes.GridSpiException - If failed.public void registerMarshaller(GridIndexingMarshaller marshaller)
registerMarshaller in interface GridIndexingSpimarshaller - Marshaller.public void registerSpace(String spaceName) throws GridSpiException
registerSpace in interface GridIndexingSpispaceName - Space name.GridSpiException - If failed.public void rebuildIndexes(@Nullable String spaceName, GridIndexingTypeDescriptor type)
rebuildIndexes in interface GridIndexingSpispaceName - Space name.type - Type descriptor.public void spiStart(@Nullable String gridName) throws GridSpiException
spiStart in interface GridSpigridName - Name of grid instance this SPI is being started for
(null for default grid).GridSpiException - Throws in case of any error during SPI start.public void spiStop()
throws GridSpiException
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.
spiStop in interface GridSpiGridSpiException - Thrown in case of any error during SPI stop.Copyright © 2014. All rights reserved.