org.apache.ignite.internal.processors.cache.query

## Class GridCacheLocalQueryManager<K,V>

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter<K,V>
  - - org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager<K,V>
    - - org.apache.ignite.internal.processors.cache.query.GridCacheLocalQueryManager<K,V>

All Implemented Interfaces:
  GridCacheManager<K,V>

    public class GridCacheLocalQueryManager<K,V>
    extends GridCacheQueryManager<K,V>

Local query manager.

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager

`qryProc`

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter

`cctx, log`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheLocalQueryManager()`

### Method Summary

Methods
`void` `loadPage(long id, GridCacheQueryAdapter<?> qry, Collection<ClusterNode> nodes, boolean all)` Loads page.
`protected 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 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.
`CacheQueryFuture<?>` `queryDistributed(GridCacheQueryBean qry, Collection<ClusterNode> nodes)` Executes distributed query.
`CacheQueryFuture<?>` `queryFieldsDistributed(GridCacheQueryBean qry, Collection<ClusterNode> nodes)` Executes distributed fields query.
`CacheQueryFuture<?>` `queryFieldsLocal(GridCacheQueryBean qry)` Executes distributed fields query.
`CacheQueryFuture<?>` `queryLocal(GridCacheQueryBean qry)` Executes local query.
`void` `start0()`

### Methods inherited from class org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager

`backupsFilter, metrics, onKernalStop0, onMetricsUpdate, onSwap, onUndeploy, onUnswap, printMemoryStats, rebuildAllIndexes, rebuildIndexes, rebuildIndexes, remove, removeFieldsQueryResult, removeQueryResult, resetMetrics, runFieldsQuery, runQuery, size, space, sqlMetadata, stop0, store`

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter

`context, kernalStartInfo, kernalStopInfo, log, onKernalStart, onKernalStart0, onKernalStop, start, startInfo, stop, stopInfo, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### GridCacheLocalQueryManager

    public GridCacheLocalQueryManager()

### Method Detail

#### onPageReady

    protected 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.

Specified by:
  `onPageReady` in class `GridCacheQueryManager<K,V>`
Parameters:
  `loc` - Local query or not.
  `qryInfo` - Query info.
  `data` - Result data.
  `finished` - Last page or not.
  `e` - Exception in case of error.
Returns:
  `true` if page was processed right.

#### onFieldsPageReady

    protected 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)

Specified by:
  `onFieldsPageReady` in class `GridCacheQueryManager<K,V>`
Parameters:
  `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.
Returns:
  `true` if page was processed right.

#### start0

    public void start0()
                throws IgniteCheckedException

Overrides:
  `start0` in class `GridCacheQueryManager<K,V>`
Throws:
  `IgniteCheckedException` - If failed.

#### queryLocal

    public CacheQueryFuture<?> queryLocal(GridCacheQueryBean qry)

Executes local query.

Specified by:
  `queryLocal` in class `GridCacheQueryManager<K,V>`
Parameters:
  `qry` - Query.
Returns:
  Query future.

#### queryDistributed

    public CacheQueryFuture<?> queryDistributed(GridCacheQueryBean qry,
                                       Collection<ClusterNode> nodes)

Executes distributed query.

Specified by:
  `queryDistributed` in class `GridCacheQueryManager<K,V>`
Parameters:
  `qry` - Query.
  `nodes` - Nodes.
Returns:
  Query future.

#### loadPage

    public void loadPage(long id,
                GridCacheQueryAdapter<?> qry,
                Collection<ClusterNode> nodes,
                boolean all)

Loads page.

Specified by:
  `loadPage` in class `GridCacheQueryManager<K,V>`
Parameters:
  `id` - Query ID.
  `qry` - Query.
  `nodes` - Nodes.
  `all` - Whether to load all pages.

#### queryFieldsLocal

    public CacheQueryFuture<?> queryFieldsLocal(GridCacheQueryBean qry)

Executes distributed fields query.

Specified by:
  `queryFieldsLocal` in class `GridCacheQueryManager<K,V>`
Parameters:
  `qry` - Query.
Returns:
  Query future.

#### queryFieldsDistributed

    public CacheQueryFuture<?> queryFieldsDistributed(GridCacheQueryBean qry,
                                             Collection<ClusterNode> nodes)

Executes distributed fields query.

Specified by:
  `queryFieldsDistributed` in class `GridCacheQueryManager<K,V>`
Parameters:
  `qry` - Query.
  `nodes` - Nodes.
Returns:
  Query future.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015