public class GridQueryProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static Class<? extends GridQueryIndexing> |
idxCls
For tests.
|
ctx, log| Constructor and Description |
|---|
GridQueryProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
initializeCache(CacheConfiguration<?,?> ccfg) |
static boolean |
isEnabled(CacheConfiguration<?,?> ccfg) |
MessageFactory |
messageFactory() |
void |
onCacheStart(GridCacheContext cctx) |
void |
onCacheStop(GridCacheContext cctx) |
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onSwap(String spaceName,
CacheObject 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 spaceName,
CacheObject key,
CacheObject val)
Will be called when entry for key will be unswapped.
|
<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> |
query(String space,
String clause,
Collection<Object> params,
String resType,
IndexingQueryFilter filters) |
<K,V> GridQueryFieldsResult |
queryFields(String space,
String clause,
Collection<Object> params,
IndexingQueryFilter filters) |
<K,V> Iterator<javax.cache.Cache.Entry<K,V>> |
queryLocal(GridCacheContext<?,?> cctx,
SqlQuery qry) |
QueryCursor<List<?>> |
queryLocalFields(GridCacheContext<?,?> cctx,
SqlFieldsQuery qry) |
<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> |
queryText(String space,
String clause,
String resType,
IndexingQueryFilter filters) |
QueryCursor<List<?>> |
queryTwoStep(GridCacheContext<?,?> cctx,
SqlFieldsQuery qry) |
<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> |
queryTwoStep(GridCacheContext<?,?> cctx,
SqlQuery qry) |
QueryCursor<List<?>> |
queryTwoStep(String space,
GridCacheTwoStepQuery qry) |
IgniteInternalFuture<?> |
rebuildAllIndexes()
Rebuilds all search indexes for given spi.
|
IgniteInternalFuture<?> |
rebuildIndexes(String space,
String valTypeName)
Rebuilds all search indexes of given value type for given space of spi.
|
void |
remove(String space,
CacheObject key,
CacheObject val) |
long |
size(String space,
Class<?> valType)
Returns number of objects of given type for given space of spi.
|
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
void |
store(String space,
CacheObject key,
CacheObject val,
byte[] ver,
long expirationTime)
Writes key-value pair to index.
|
GridQueryTypeDescriptor |
type(String space,
String typeName)
Gets type descriptor for space and type name.
|
static String |
typeName(Class<?> cls)
Gets type name by class.
|
Collection<GridQueryTypeDescriptor> |
types(String space)
Gets types for space.
|
assertParameter, collectDiscoveryData, discoveryDataType, onDiscoveryDataReceived, onKernalStart, printMemoryStats, toString, validateNodepublic static Class<? extends GridQueryIndexing> idxCls
public GridQueryProcessor(GridKernalContext ctx) throws IgniteCheckedException
ctx - Kernal context.IgniteCheckedExceptionpublic void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public static boolean isEnabled(CacheConfiguration<?,?> ccfg)
ccfg - Cache configuration.true If query index must be enabled for this cache.public void initializeCache(CacheConfiguration<?,?> ccfg) throws IgniteCheckedException
ccfg - Cache configuration.IgniteCheckedException - If failed.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.public void onCacheStart(GridCacheContext cctx) throws IgniteCheckedException
cctx - Cache context.IgniteCheckedException - If failed.public void onCacheStop(GridCacheContext cctx)
cctx - Cache context.public long size(@Nullable String space, Class<?> valType) throws IgniteCheckedException
space - Space.valType - Value type.IgniteCheckedException - If failed.public IgniteInternalFuture<?> rebuildIndexes(@Nullable String space, String valTypeName)
space - Space.valTypeName - Value type name.public IgniteInternalFuture<?> rebuildAllIndexes()
public void store(String space, CacheObject key, CacheObject val, byte[] ver, long expirationTime) throws IgniteCheckedException
space - Space.key - Key.val - Value.ver - Cache entry version.expirationTime - Expiration time or 0 if never expires.IgniteCheckedException - In case of error.public <K,V> GridCloseableIterator<IgniteBiTuple<K,V>> query(String space, String clause, Collection<Object> params, String resType, IndexingQueryFilter filters) throws IgniteCheckedException
space - Space.clause - Clause.params - Parameters collection.resType - Result type.filters - Filters.IgniteCheckedException - If failed.public QueryCursor<List<?>> queryTwoStep(String space, GridCacheTwoStepQuery qry)
space - Space name.qry - Query.public QueryCursor<List<?>> queryTwoStep(GridCacheContext<?,?> cctx, SqlFieldsQuery qry)
cctx - Cache context.qry - Query.public <K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> queryTwoStep(GridCacheContext<?,?> cctx, SqlQuery qry)
cctx - Cache context.qry - Query.public <K,V> Iterator<javax.cache.Cache.Entry<K,V>> queryLocal(GridCacheContext<?,?> cctx, SqlQuery qry)
cctx - Cache context.qry - Query.public MessageFactory messageFactory()
GridIoManager.public QueryCursor<List<?>> queryLocalFields(GridCacheContext<?,?> cctx, SqlFieldsQuery qry)
cctx - Cache context.qry - Query.public void remove(String space, CacheObject key, CacheObject val) throws IgniteCheckedException
space - Space.key - Key.IgniteCheckedException - Thrown in case of any errors.public static String typeName(Class<?> cls)
cls - Class.public <K,V> GridCloseableIterator<IgniteBiTuple<K,V>> queryText(String space, String clause, String resType, IndexingQueryFilter filters) throws IgniteCheckedException
K - Key type.V - Value type.space - Space.clause - Clause.resType - Result type.filters - Key and value filters.IgniteCheckedException - If failed.public <K,V> GridQueryFieldsResult queryFields(@Nullable String space, String clause, Collection<Object> params, IndexingQueryFilter filters) throws IgniteCheckedException
space - Space name.clause - Clause.params - Parameters collection.filters - Key and value filters.IgniteCheckedException - If failed.public void onSwap(String spaceName, CacheObject key) throws IgniteCheckedException
spaceName - Space name.key - key.IgniteCheckedException - If failed.public void onUnswap(String spaceName, CacheObject key, CacheObject val) throws IgniteCheckedException
spaceName - Space name.key - Key.val - Value.IgniteCheckedException - If failed.public void onUndeploy(@Nullable String space, ClassLoader ldr) throws IgniteCheckedException
space - Space name.ldr - Class loader to undeploy.IgniteCheckedException - If undeploy failed.public Collection<GridQueryTypeDescriptor> types(@Nullable String space)
space - Space name.public GridQueryTypeDescriptor type(@Nullable String space, String typeName) throws IgniteCheckedException
space - Space name.typeName - Type name.IgniteCheckedException - If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.1.0-incubating Release Date : May 20 2015