org.apache.ignite.cache.query

## Class Query<R>

- java.lang.Object
- - org.apache.ignite.cache.query.Query<R>

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    AbstractContinuousQuery, ScanQuery, SpiQuery, SqlFieldsQuery, SqlQuery, TextQuery

      public abstract class Query<R>
      extends Object
      implements Serializable

  Main API for configuring and executing cache queries. Supported queries are:
  - SQL Fields query.Provides SQL way with full syntax to access cache data. See `SqlFieldsQuery` for details.
  - Full-text query. Uses full-text search engine based on Apache Lucene engine. See `TextQuery` for details.
  - Scan query. Provides effective and flexible way to full cache\partition scan. See `ScanQuery` for details.
  - Continuous query. Provides flexible way to process all existed cache data and all future cache updates as well. See `ContinuousQuery` for details.
  - Spi query. Allow run queries for pluggable user query engine implementation. See `SpiQuery` for details.
  See Also:
    `IgniteCache.query(Query)`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DFLT_PAGE_SIZE` Default query page size.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getPageSize()` Gets optional page size, if `0`, then default is used.
    `boolean` | `isLocal()` Returns `true` if this query should be executed on local node only.
    `protected int[]` | `prepare(int[] parts)` Prepares the partitions.
    `Query<R>` | `setLocal(boolean loc)` Sets whether this query should be executed on local node only.
    `Query<R>` | `setPageSize(int pageSize)` Sets optional page size, if `0`, then default is used.
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### DFLT_PAGE_SIZE

          public static final int DFLT_PAGE_SIZE

      Default query page size.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getPageSize

          public int getPageSize()

      Gets optional page size, if `0`, then default is used.
      Returns:
        Optional page size.

    - #### setPageSize

          public Query<R> setPageSize(int pageSize)

      Sets optional page size, if `0`, then default is used.
      Parameters:
        `pageSize` - Optional page size.
      Returns:
        `this` for chaining.

    - #### isLocal

          public boolean isLocal()

      Returns `true` if this query should be executed on local node only.
      Returns:
        Local flag.

    - #### setLocal

          public Query<R> setLocal(boolean loc)

      Sets whether this query should be executed on local node only.
      Parameters:
        `loc` - Local flag.
      Returns:
        `this` for chaining.

    - #### prepare

          protected int[] prepare(int[] parts)

      Prepares the partitions.
      Parameters:
        `parts` - Partitions.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021