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

## Class GridCacheQueryErrorFuture<T>

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFinishedFuture<Collection<T>>
  - - org.apache.ignite.internal.processors.cache.query.GridCacheQueryErrorFuture<T>

All Implemented Interfaces:
  IgniteInternalFuture<Collection<T>>, CacheQueryFuture<T>

    public class GridCacheQueryErrorFuture<T>
    extends GridFinishedFuture<Collection<T>>
    implements CacheQueryFuture<T>

Error future.

### Constructor Summary

Constructors
Constructor and Description
`GridCacheQueryErrorFuture(GridKernalContext ctx, Throwable err)`

### Method Summary

Methods
`int` `available()` Returns number of elements that are already fetched and can be returned from `CacheQueryFuture.next()` method without blocking.
`T` `next()` Returns next element from result set.

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

`cancel, chain, duration, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, result, startTime, toString`

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

`cancel, isDone`

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

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

### Constructor Detail

#### GridCacheQueryErrorFuture

    public GridCacheQueryErrorFuture(GridKernalContext ctx,
                             Throwable err)

Parameters:
  `ctx` - Context.
  `err` - Error.

### Method Detail

#### available

    public int available()
                  throws IgniteCheckedException

Returns number of elements that are already fetched and can be returned from `CacheQueryFuture.next()` method without blocking.

Specified by:
  `available` in interface `CacheQueryFuture<T>`
Returns:
  Number of fetched elements which are available immediately.
Throws:
  `IgniteCheckedException` - In case of error.

#### next

    @Nullable
    public 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.

Specified by:
  `next` in interface `CacheQueryFuture<T>`
Returns:
  Next fetched element or `null` if all the elements have been fetched.
Throws:
  `IgniteCheckedException` - If failed.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0.final
Release Date | : December 29 2015