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

## Interface CacheQueryFuture<T>

All Superinterfaces:
  AutoCloseable, IgniteInternalFuture<Collection<T>>

All Known Implementing Classes:
  GridCacheDistributedFieldsQueryFuture, GridCacheDistributedQueryFuture, GridCacheLocalFieldsQueryFuture, GridCacheLocalQueryFuture, GridCacheQueryErrorFuture, GridCacheQueryFutureAdapter

    public interface CacheQueryFuture<T>
    extends IgniteInternalFuture<Collection<T>>, AutoCloseable

Cache query future returned by query execution. Refer to `CacheQuery` documentation for more information.

### Method Summary

Methods
`boolean` `cancel()` Cancels this query future and stop receiving any further results for the query associated with this future.
`boolean` `isDone()` Checks if all data is fetched by the query.
`T` `next()` Returns next element from result set.

### Methods inherited from interface org.apache.ignite.internal.IgniteInternalFuture

`chain, chain, duration, error, get, get, get, getUninterruptibly, isCancelled, listen, result, startTime`

### Methods inherited from interface java.lang.AutoCloseable

`close`

### Method Detail

#### next

    @Nullable
    T next()
           throws IgniteCheckedException

Returns next element from result set.

This is a blocking call which will wait if there are no elements available immediately.

Returns:
  Next fetched element or `null` if all the elements have been fetched.
Throws:
  `IgniteCheckedException` - If failed.

#### isDone

    boolean isDone()

Checks if all data is fetched by the query.

Specified by:
  `isDone` in interface `IgniteInternalFuture<Collection<T>>`
Returns:
  `True` if all data is fetched, `false` otherwise.

#### cancel

    boolean cancel()
                   throws IgniteCheckedException

Cancels this query future and stop receiving any further results for the query associated with this future.

Specified by:
  `cancel` in interface `IgniteInternalFuture<Collection<T>>`
Returns:
  `True` if future was canceled (i.e. was not finished prior to this call).
Throws:
  `IgniteCheckedException` - If cancellation failed.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.9.0
Release Date | : March 2 2017