public abstract class GridCacheQueryManager<K,V> extends GridCacheManagerAdapter<K,V>
| Modifier and Type | Field and Description |
|---|---|
protected GridQueryProcessor |
qryProc |
cctx, log| Constructor and Description |
|---|
GridCacheQueryManager() |
| Modifier and Type | Method and Description |
|---|---|
<K,V> IndexingQueryFilter |
backupsFilter(boolean includeBackups) |
abstract void |
loadPage(long id,
GridCacheQueryAdapter<?> qry,
Collection<ClusterNode> nodes,
boolean all)
Loads page.
|
QueryMetrics |
metrics()
Gets cache queries metrics.
|
protected abstract boolean |
onFieldsPageReady(boolean loc,
org.apache.ignite.internal.processors.cache.query.GridCacheQueryInfo qryInfo,
List<GridQueryFieldMetadata> metaData,
Collection<?> entities,
Collection<?> data,
boolean finished,
Throwable e) |
protected void |
onKernalStop0(boolean cancel) |
void |
onMetricsUpdate(long duration,
boolean fail) |
protected abstract boolean |
onPageReady(boolean loc,
org.apache.ignite.internal.processors.cache.query.GridCacheQueryInfo qryInfo,
Collection<?> data,
boolean finished,
Throwable e)
Called when data for page is ready.
|
void |
onSwap(String swapSpaceName,
K key)
Entry for given key unswapped.
|
void |
onUndeploy(ClassLoader ldr)
Undeploys given class loader.
|
void |
onUnswap(K key,
V val,
byte[] valBytes)
Entry for given key unswapped.
|
void |
printMemoryStats()
Prints memory statistics for debugging purposes.
|
abstract CacheQueryFuture<?> |
queryDistributed(GridCacheQueryBean qry,
Collection<ClusterNode> nodes)
Executes distributed query.
|
abstract CacheQueryFuture<?> |
queryFieldsDistributed(GridCacheQueryBean qry,
Collection<ClusterNode> nodes)
Executes distributed fields query.
|
abstract CacheQueryFuture<?> |
queryFieldsLocal(GridCacheQueryBean qry)
Executes distributed fields query.
|
abstract CacheQueryFuture<?> |
queryLocal(GridCacheQueryBean qry)
Executes local query.
|
IgniteInternalFuture<?> |
rebuildAllIndexes()
Rebuilds all search indexes of all types.
|
IgniteInternalFuture<?> |
rebuildIndexes(Class<?> valType)
Rebuilds all search indexes of given value type.
|
IgniteInternalFuture<?> |
rebuildIndexes(String typeName)
Rebuilds all search indexes of given value type.
|
void |
remove(Object key) |
protected void |
removeFieldsQueryResult(UUID sndId,
long reqId) |
protected void |
removeQueryResult(UUID sndId,
long reqId) |
void |
resetMetrics()
Resets metrics.
|
protected void |
runFieldsQuery(org.apache.ignite.internal.processors.cache.query.GridCacheQueryInfo qryInfo)
Processes fields query request.
|
protected void |
runQuery(org.apache.ignite.internal.processors.cache.query.GridCacheQueryInfo qryInfo)
Processes cache query request.
|
long |
size(Class<?> valType)
Gets number of objects of given type in index.
|
String |
space()
FOR TESTING ONLY
|
Collection<GridCacheSqlMetadata> |
sqlMetadata()
Gets SQL metadata.
|
void |
start0() |
void |
stop0(boolean cancel)
Stops query manager.
|
void |
store(K key,
byte[] keyBytes,
V val,
byte[] valBytes,
GridCacheVersion ver,
long expirationTime)
Writes key-value pair to index.
|
context, kernalStartInfo, kernalStopInfo, log, onKernalStart, onKernalStart0, onKernalStop, start, startInfo, stop, stopInfo, toStringprotected GridQueryProcessor qryProc
public void start0()
throws IgniteCheckedException
start0 in class GridCacheManagerAdapter<K,V>IgniteCheckedException - If failed.protected void onKernalStop0(boolean cancel)
onKernalStop0 in class GridCacheManagerAdapter<K,V>cancel - Cancel flag.public final void stop0(boolean cancel)
stop0 in class GridCacheManagerAdapter<K,V>cancel - Cancel queries.public long size(Class<?> valType) throws IgniteCheckedException
valType - Value type.IgniteCheckedException - If failed.public IgniteInternalFuture<?> rebuildIndexes(Class<?> valType)
valType - Value type.public IgniteInternalFuture<?> rebuildIndexes(String typeName)
typeName - Value type name.public IgniteInternalFuture<?> rebuildAllIndexes()
public void onSwap(String swapSpaceName, K key) throws IgniteCheckedException
swapSpaceName - Swap space name.key - Key.IgniteCheckedException - If failed.public void onUnswap(K key, V val, byte[] valBytes) throws IgniteCheckedException
key - Key.val - ValuevalBytes - Value bytes.IgniteCheckedException - If failed.public void store(K key, @Nullable byte[] keyBytes, @Nullable V val, @Nullable byte[] valBytes, GridCacheVersion ver, long expirationTime) throws IgniteCheckedException
key - Key.keyBytes - Byte array with key data.val - Value.valBytes - Value bytes.ver - Cache entry version.expirationTime - Expiration time or 0 if never expires.IgniteCheckedException - In case of error.public void remove(Object key) throws IgniteCheckedException
key - Key.IgniteCheckedException - Thrown in case of any errors.public void onUndeploy(ClassLoader ldr)
ldr - Class loader to undeploy.public abstract CacheQueryFuture<?> queryLocal(GridCacheQueryBean qry)
qry - Query.public abstract CacheQueryFuture<?> queryDistributed(GridCacheQueryBean qry, Collection<ClusterNode> nodes)
qry - Query.nodes - Nodes.public abstract void loadPage(long id,
GridCacheQueryAdapter<?> qry,
Collection<ClusterNode> nodes,
boolean all)
id - Query ID.qry - Query.nodes - Nodes.all - Whether to load all pages.public abstract CacheQueryFuture<?> queryFieldsLocal(GridCacheQueryBean qry)
qry - Query.public abstract CacheQueryFuture<?> queryFieldsDistributed(GridCacheQueryBean qry, Collection<ClusterNode> nodes)
qry - Query.nodes - Nodes.protected void runFieldsQuery(org.apache.ignite.internal.processors.cache.query.GridCacheQueryInfo qryInfo)
qryInfo - Query info.protected void runQuery(org.apache.ignite.internal.processors.cache.query.GridCacheQueryInfo qryInfo)
qryInfo - Query info.protected void removeQueryResult(@Nullable UUID sndId, long reqId)
sndId - Sender node ID.reqId - Request ID.protected void removeFieldsQueryResult(@Nullable UUID sndId, long reqId)
sndId - Sender node ID.reqId - Request ID.protected abstract boolean onPageReady(boolean loc,
org.apache.ignite.internal.processors.cache.query.GridCacheQueryInfo qryInfo,
@Nullable
Collection<?> data,
boolean finished,
@Nullable
Throwable e)
loc - Local query or not.qryInfo - Query info.data - Result data.finished - Last page or not.e - Exception in case of error.true if page was processed right.protected abstract boolean onFieldsPageReady(boolean loc,
org.apache.ignite.internal.processors.cache.query.GridCacheQueryInfo qryInfo,
@Nullable
List<GridQueryFieldMetadata> metaData,
@Nullable
Collection<?> entities,
@Nullable
Collection<?> data,
boolean finished,
@Nullable
Throwable e)
loc - Local query or not.qryInfo - Query info.metaData - Meta data.entities - Indexing entities.data - Data.finished - Last page or not.e - Exception in case of error.true if page was processed right.public QueryMetrics metrics()
public void resetMetrics()
public void onMetricsUpdate(long duration,
boolean fail)
duration - Execution duration.fail - true if execution failed.public Collection<GridCacheSqlMetadata> sqlMetadata() throws IgniteCheckedException
IgniteCheckedException - In case of error.@Nullable public <K,V> IndexingQueryFilter backupsFilter(boolean includeBackups)
K - Key type.V - Value type.includeBackups - Include backups.public void printMemoryStats()
printMemoryStats in interface GridCacheManager<K,V>printMemoryStats in class GridCacheManagerAdapter<K,V>public String space()
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015