public class GridIndexingManager extends GridManagerAdapter<GridIndexingSpi>
ctx, log| Constructor and Description |
|---|
GridIndexingManager(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onKernalStop0(boolean cancel) |
void |
onSwap(String spi,
String spaceName,
String swapSpaceName,
Object key)
Will be called when entry for key will be swapped.
|
void |
onUndeploy(String space,
ClassLoader ldr)
Removes index tables for all classes belonging to given class loader.
|
void |
onUnswap(String spi,
String spaceName,
Object key,
Object val,
byte[] valBytes)
Will be called when entry for key will be unswapped.
|
<K,V> GridCloseableIterator<GridIndexingKeyValueRow<K,V>> |
query(String spi,
String space,
String clause,
Collection<Object> params,
Class<? extends V> resType,
boolean includeBackups,
GridIndexingQueryFilter<K,V>... filters) |
<K,V> GridIndexingFieldsResult |
queryFields(String spi,
String space,
String clause,
Collection<Object> params,
boolean includeBackups,
GridIndexingQueryFilter<K,V>... filters) |
<K,V> GridCloseableIterator<GridIndexingKeyValueRow<K,V>> |
queryText(String spi,
String space,
String clause,
Class<? extends V> resType,
boolean includeBackups,
GridIndexingQueryFilter<K,V>... filters) |
GridFuture<?> |
rebuildAllIndexes(String spi)
Rebuilds all search indexes for given spi.
|
GridFuture<?> |
rebuildIndexes(String spi,
String space,
Class<?> valType)
Rebuilds all search indexes of given value type for given space of spi.
|
<K> boolean |
remove(String spi,
String space,
K key,
byte[] keyBytes) |
long |
size(String spi,
String space,
Class<?> valType)
Returns number of objects of given type for given space of spi.
|
GridIndexingSpi |
spi(String name)
FOR TESTING ONLY
|
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
<K,V> void |
store(String spi,
String space,
K key,
byte[] keyBytes,
V val,
byte[] valBytes,
byte[] ver,
long expirationTime)
Writes key-value pair to index.
|
Collection<GridIndexingTypeDescriptor> |
types(String space)
Gets types for space.
|
addSpiAttributes, assertParameter, collectDiscoveryData, enabled, getSpi, getSpi, getSpis, onDiscoveryDataReceived, onKernalStart, onKernalStart0, onKernalStop, printMemoryStats, startInfo, startSpi, stopInfo, stopSpi, toString, validateNodepublic GridIndexingManager(GridKernalContext ctx)
ctx - Kernal context.public void start()
throws GridException
GridComponentGridException - Thrown in case of any errors.protected void onKernalStop0(boolean cancel)
onKernalStop0 in class GridManagerAdapter<GridIndexingSpi>cancel - Cancel flag.public void stop(boolean cancel)
throws GridException
GridComponentcancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.GridException - Thrown in case of any errors.public long size(@Nullable String spi, @Nullable String space, Class<?> valType) throws GridException
spi - SPI Name.space - Space.valType - Value type.GridException - If failed.public GridFuture<?> rebuildIndexes(@Nullable String spi, @Nullable String space, Class<?> valType)
spi - SPI name.space - Space.valType - Value type.public GridFuture<?> rebuildAllIndexes(@Nullable String spi)
spi - SPI name.public GridIndexingSpi spi(@Nullable String name)
name - SPI Name.public <K,V> void store(String spi, String space, K key, @Nullable byte[] keyBytes, V val, @Nullable byte[] valBytes, byte[] ver, long expirationTime) throws GridException
spi - SPI Name.space - Space.key - Key.keyBytes - Byte array with key data.val - Value.valBytes - Byte array with value data.ver - Cache entry version.expirationTime - Expiration time or 0 if never expires.GridException - In case of error.public <K> boolean remove(String spi, String space, K key, @Nullable byte[] keyBytes) throws GridException
spi - SPI Name.space - Space.key - Key.keyBytes - Byte array with key value.true if key was found and removed, otherwise false.GridException - Thrown in case of any errors.public <K,V> GridIndexingFieldsResult queryFields(@Nullable String spi, @Nullable String space, String clause, Collection<Object> params, boolean includeBackups, GridIndexingQueryFilter<K,V>... filters) throws GridException
spi - SPI Name.space - Space name.clause - Clause.params - Parameters collection.includeBackups - Include or exclude backup entries.filters - Key and value filters.GridException - If failed.public <K,V> GridCloseableIterator<GridIndexingKeyValueRow<K,V>> query(String spi, String space, String clause, Collection<Object> params, Class<? extends V> resType, boolean includeBackups, GridIndexingQueryFilter<K,V>... filters) throws GridException
K - Key type.V - Value type.spi - SPI Name.space - Space.clause - Clause.params - Parameters collection.resType - Result type.includeBackups - Include or exclude backup entries.filters - Filters.GridException - If failed.public <K,V> GridCloseableIterator<GridIndexingKeyValueRow<K,V>> queryText(String spi, String space, String clause, Class<? extends V> resType, boolean includeBackups, GridIndexingQueryFilter<K,V>... filters) throws GridException
K - Key type.V - Value type.spi - SPI Name.space - Space.clause - Clause.resType - Result type.includeBackups - Include or exclude backup entries.filters - Key and value filters.GridException - If failed.public void onSwap(String spi, String spaceName, String swapSpaceName, Object key) throws GridSpiException
spi - Spi name.spaceName - Space name.swapSpaceName - Swap space name.key - key.GridSpiException - If failed.public void onUnswap(String spi, String spaceName, Object key, Object val, byte[] valBytes) throws GridSpiException
spi - Spi name.spaceName - Space name.key - Key.val - Value.valBytes - Value bytes.GridSpiException - If failed.public void onUndeploy(@Nullable String space, ClassLoader ldr) throws GridException
space - Space name.ldr - Class loader to undeploy.GridException - If undeploy failed.public Collection<GridIndexingTypeDescriptor> types(@Nullable String space)
space - Space name.Copyright © 2014. All rights reserved.