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

## Class GridCacheLocalQueryFuture<K,V,R>

- java.lang.Object
- - java.util.concurrent.locks.AbstractOwnableSynchronizer
  - - java.util.concurrent.locks.AbstractQueuedSynchronizer
    - - org.apache.ignite.internal.util.future.GridFutureAdapter<Collection<R>>
      - - org.apache.ignite.internal.processors.cache.query.GridCacheQueryFutureAdapter<K,V,R>
        - - org.apache.ignite.internal.processors.cache.query.GridCacheLocalQueryFuture<K,V,R>

All Implemented Interfaces:
  Serializable, IgniteInternalFuture<Collection<R>>, CacheQueryFuture<R>, GridTimeoutObject

Direct Known Subclasses:
  GridCacheLocalFieldsQueryFuture

    public class GridCacheLocalQueryFuture<K,V,R>
    extends GridCacheQueryFutureAdapter<K,V,R>

Local query future.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

`AbstractQueuedSynchronizer.ConditionObject`

### Field Summary

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

`cctx, loc, log, mux, qry`

### Constructor Summary

Constructors
`protected` `GridCacheLocalQueryFuture(GridCacheContext<K,V> ctx, GridCacheQueryBean qry)`

### Method Summary

Methods
`void` `awaitFirstPage()` Waits for the first page to be received from remote node(s), if any.
`protected void` `cancelQuery()`
`protected void` `loadAllPages()` Loads all left pages.
`protected void` `loadPage()` Loads next page.
`protected boolean` `onPage(UUID nodeId, boolean last)`

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

`available, cancel, endTime, enqueue, get, get, getUninterruptibly, next, nextPage, nextPage, onDone, onNodeLeft, onPage, onTimeout, printMemoryStats, query, timeoutId, toString`

### Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter

`chain, duration, error, get, get0, ignoreInterrupts, isCancelled, isDone, isFailed, listen, onCancelled, onDone, onDone, onDone, result, startTime, tryAcquireShared, tryReleaseShared`

### Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

`acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryRelease`

### Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer

`getExclusiveOwnerThread, setExclusiveOwnerThread`

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

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

### Methods inherited from interface org.apache.ignite.internal.processors.cache.query.CacheQueryFuture

`isDone`

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

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

### Constructor Detail

#### GridCacheLocalQueryFuture

    protected GridCacheLocalQueryFuture(GridCacheContext<K,V> ctx,
                             GridCacheQueryBean qry)

Parameters:
  `ctx` - Context.
  `qry` - Query.

### Method Detail

#### cancelQuery

    protected void cancelQuery()
                        throws IgniteCheckedException

Specified by:
  `cancelQuery` in class `GridCacheQueryFutureAdapter<K,V,R>`
Throws:
  `IgniteCheckedException` - In case of error.

#### onPage

    protected boolean onPage(UUID nodeId,
                 boolean last)

Specified by:
  `onPage` in class `GridCacheQueryFutureAdapter<K,V,R>`
Parameters:
  `nodeId` - Sender node id.
  `last` - Whether page is last.
Returns:
  Is query finished or not.

#### loadPage

    protected void loadPage()

Loads next page.

Specified by:
  `loadPage` in class `GridCacheQueryFutureAdapter<K,V,R>`

#### loadAllPages

    protected void loadAllPages()

Loads all left pages.

Specified by:
  `loadAllPages` in class `GridCacheQueryFutureAdapter<K,V,R>`

#### awaitFirstPage

    public void awaitFirstPage()
                        throws IgniteCheckedException

Waits for the first page to be received from remote node(s), if any.

Specified by:
  `awaitFirstPage` in class `GridCacheQueryFutureAdapter<K,V,R>`
Throws:
  `IgniteCheckedException` - If query execution failed with an error.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015