public class GridQueryProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static String |
_VAL |
static Class<? extends GridQueryIndexing> |
idxCls
For tests.
|
ctx, log| Constructor and Description |
|---|
GridQueryProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
executeQuery(GridCacheContext<?,?> cctx,
IgniteOutClosureX<R> clo,
boolean complete) |
static boolean |
isEnabled(CacheConfiguration<?,?> ccfg) |
static boolean |
isGeometryClass(Class<?> cls)
Checks if the given class is GEOMETRY.
|
static boolean |
isSqlType(Class<?> cls)
Checks if the given class can be mapped to a simple SQL type.
|
boolean |
moduleEnabled() |
void |
onCacheStart(GridCacheContext cctx) |
void |
onCacheStop(GridCacheContext cctx) |
static void |
onCompleted(GridCacheContext<?,?> cctx,
Object res,
Throwable err,
long startTime,
long duration,
IgniteLogger log) |
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
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> Iterator<javax.cache.Cache.Entry<K,V>> |
queryLocal(GridCacheContext<?,?> cctx,
SqlQuery qry,
boolean keepBinary) |
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) |
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) |
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.
|
static String |
typeName(String clsName)
Gets type name by class.
|
Collection<GridQueryTypeDescriptor> |
types(String space)
Gets types for space.
|
assertParameter, collectDiscoveryData, discoveryDataType, onDiscoveryDataReceived, onKernalStart, onReconnected, printMemoryStats, toString, validateNodepublic static final String _VAL
public 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 boolean moduleEnabled()
true If indexing module is in classpath and successfully initialized.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 onDisconnected(IgniteFuture<?> reconnectFut) throws IgniteCheckedException
onDisconnected in interface GridComponentonDisconnected in class GridProcessorAdapterreconnectFut - Reconnect future.IgniteCheckedException - If failed.public void onCacheStart(GridCacheContext cctx) throws IgniteCheckedException
cctx - Cache context.IgniteCheckedException - If failed.public void onCacheStop(GridCacheContext cctx)
cctx - Cache context.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 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, boolean keepBinary)
cctx - Cache context.qry - Query.keepBinary - Keep binary flag.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 boolean isSqlType(Class<?> cls)
cls - Class.true If can.public static boolean isGeometryClass(Class<?> cls)
cls - Class.true If this is geometry.public static String typeName(Class<?> cls)
cls - Class.public static String typeName(String clsName)
clsName - Class name.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 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.public <R> R executeQuery(GridCacheContext<?,?> cctx, IgniteOutClosureX<R> clo, boolean complete) throws IgniteCheckedException
cctx - Cache context.clo - Closure.complete - Complete.IgniteCheckedExceptionpublic static void onCompleted(GridCacheContext<?,?> cctx, Object res, Throwable err, long startTime, long duration, IgniteLogger log)
cctx - Cctx.res - Result.err - Err.startTime - Start time.duration - Duration.log - Logger.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.7.0 Release Date : August 1 2016