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 (for cache in LOCAL cache mode).

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager

`GridCacheQueryManager.CacheSqlIndexMetadata, GridCacheQueryManager.CacheSqlMetadata, GridCacheQueryManager.QueryResult<K,V>, GridCacheQueryManager.RequestFutureMap, GridCacheQueryManager.ScanQueryIterator<K,V>`

### Field Summary

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

`cctx, log, starting`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheLocalQueryManager()`

### Method Summary

All Methods Instance Methods Concrete 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, @Nullable List<GridQueryFieldMetadata> metaData, @Nullable Collection<?> entities, @Nullable Collection<?> data, boolean finished, @Nullable 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.
`GridCloseableIterator` `scanQueryDistributed(GridCacheQueryAdapter qry, Collection<ClusterNode> nodes)` Executes distributed SCAN query.
`void` `start0()`

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

`cacheName, collectMetrics, createFullTextQuery, createScanQuery, createScanQuery, createSpiQuery, detailMetrics, enable, enabled, evictDetailMetrics, localQueryIterators, metrics, onKernalStop0, printMemoryStats, queryIterators, queryTopologyVersion, remove, removeFieldsQueryResult, removeQueryResult, resetDetailMetrics, resetMetrics, runFieldsQuery, runQuery, scanQueryLocal, sqlMetadata, sqlMetadataAsync, sqlMetadataV2, stop0, store`

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

`context, kernalStartInfo, kernalStopInfo, log, onDisconnected, 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
                                        @Nullable List<GridQueryFieldMetadata> metaData,
                                        @Nullable
                                        @Nullable Collection<?> entities,
                                        @Nullable
                                        @Nullable Collection<?> data,
                                        boolean finished,
                                        @Nullable
                                        @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.

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

#### scanQueryDistributed

    public GridCloseableIterator scanQueryDistributed(GridCacheQueryAdapter qry,
                                                      Collection<ClusterNode> nodes)
                                               throws IgniteCheckedException

Executes distributed SCAN query.

Specified by:
  `scanQueryDistributed` in class `GridCacheQueryManager<K,V>`
Parameters:
  `qry` - Query.
  `nodes` - Nodes.
Returns:
  Iterator.
Throws:
  `IgniteCheckedException` - If failed.

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

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021