Interface QueryProcessorConnection.QueryHandle
- All Known Subinterfaces:
QueryProcessorConnection.QueryFuture<RETURN_TYPE>
- Enclosing interface:
- QueryProcessorConnection
public static interface QueryProcessorConnection.QueryHandle
Interface returned from asynchronous queries. This handle may be used to wait for the query to complete, or to
cancel execution of the query.
-
Method Details
-
isReady
boolean isReady()Check if the query has completed and produced a result. If this method returns 'true' a call toawait()
orQueryProcessorConnection.QueryFuture.get()
will return immediately.- Returns:
- true if completed, false otherwise.
-
await
block until the query is finished- Throws:
InterruptedException
-
await
await but only as long as the timeout- Throws:
InterruptedException
-
cancel
boolean cancel()Attempt to cancel the query. This might return false if the query is finished or the query is shutting down- Returns:
- true if the cancel attempt is possible
-