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 toCacheQuerydocumentation for more information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancancel()Cancels this query future and stop receiving any further results for the query associated with this future.booleanisDone()Checks if all data is fetched by the query.Tnext()Returns next element from result set.-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface org.apache.ignite.internal.IgniteInternalFuture
chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, isCancelled, listen, listen, result
-
-
-
-
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
nullif all the elements have been fetched. - Throws:
IgniteCheckedException- If failed.
-
isDone
boolean isDone()
Checks if all data is fetched by the query.- Specified by:
isDonein interfaceIgniteInternalFuture<T>- Returns:
Trueif all data is fetched,falseotherwise.
-
cancel
boolean cancel() throws IgniteCheckedExceptionCancels this query future and stop receiving any further results for the query associated with this future.- Specified by:
cancelin interfaceIgniteInternalFuture<T>- Returns:
Trueif future was canceled (i.e. was not finished prior to this call).- Throws:
IgniteCheckedException- If cancellation failed.
-
-