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 Summary
Modifier and TypeMethodDescriptionvoidawait()block until the query is finishedvoidawait(long timeoutMillis) await but only as long as the timeoutbooleancancel()Attempt to cancel the query.booleanAttempt to cancel the query.booleanisReady()Check if the query has completed and produced a result.
-
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
-
cancel
Attempt to cancel the query. This might return false if the query is finished or the query is shutting down.- Parameters:
message- an optional message to be passed to the query in theCommandarguments- Returns:
- true if the cancel attempt is possible
-