Interface QueryDispatcherConnection.QueryProcessorRequestHandle
- Enclosing interface:
- QueryDispatcherConnection
public static interface QueryDispatcherConnection.QueryProcessorRequestHandle
Single-use query processor request tracking mechanism. Enables cancellation of requests in progress as well
as already-running remote query processors.
-
Method Summary
Modifier and TypeMethodDescriptionsendRequest
(RemoteProcessingRequest request, boolean exportQueryScope, List<RemoteQueryClassDefinition> classList, long timeoutMillis, QueryProcessorConnection.DisconnectHandler disconnectHandler, io.deephaven.enterprise.comm.ConnectionMonitor.Params connectionMonitorParams, TokenFactoryFactory tokenAuthenticationManager) Send an asynchronous request for a new query processor.default void
Delegate toQueryDispatcherConnection.sendCancelJob(String, boolean, boolean)
with processInfoId=null, ignoreMissingJob=false and waitForResponse=false.default void
sendRequestCancellation
(boolean ignoreMissingJob) Delegate toQueryDispatcherConnection.sendCancelJob(String, boolean, boolean)
with processInfoId=null and waitForResponse=false.void
sendRequestCancellation
(boolean ignoreMissingJob, boolean waitForResponse) Send an asynchronous request to initiate cancellation of a previous request for a new query processor, whether that request is currently in progress (triggers removal from the queue) or completed (triggers remote query processor death).Wait for the completion of a previously sent request, initiate connection to the assigned remote query processor, and return the connection object.Wait for the processor's connection details
-
Method Details
-
sendRequest
QueryDispatcherConnection.QueryProcessorRequestHandle sendRequest(RemoteProcessingRequest request, boolean exportQueryScope, List<RemoteQueryClassDefinition> classList, long timeoutMillis, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler, @Nullable io.deephaven.enterprise.comm.ConnectionMonitor.Params connectionMonitorParams, @NotNull TokenFactoryFactory tokenAuthenticationManager) throws RemoteQueryException Send an asynchronous request for a new query processor. May only be invoked once.- Parameters:
request
-exportQueryScope
-classList
-timeoutMillis
-disconnectHandler
-connectionMonitorParams
-tokenAuthenticationManager
-- Returns:
- This object, to allow for chained methods.
- Throws:
RemoteQueryException
-
sendRequestCancellation
Delegate toQueryDispatcherConnection.sendCancelJob(String, boolean, boolean)
with processInfoId=null, ignoreMissingJob=false and waitForResponse=false.- Throws:
RemoteQueryException
- Note: Will prevent future sendRequest() calls from succeeding. Will execute after a concurrent sendRequest() call completes.
-
sendRequestCancellation
Delegate toQueryDispatcherConnection.sendCancelJob(String, boolean, boolean)
with processInfoId=null and waitForResponse=false.- Parameters:
ignoreMissingJob
- if true, don't return an exception if the job is missing- Throws:
RemoteQueryException
- Note: Will prevent future sendRequest() calls from succeeding. Will execute after a concurrent sendRequest() call completes.
-
sendRequestCancellation
void sendRequestCancellation(boolean ignoreMissingJob, boolean waitForResponse) throws RemoteQueryException Send an asynchronous request to initiate cancellation of a previous request for a new query processor, whether that request is currently in progress (triggers removal from the queue) or completed (triggers remote query processor death).- Parameters:
waitForResponse
- if true, wait for a response from the dispatcher before returning- Throws:
RemoteQueryException
- Note: Will prevent future sendRequest() calls from succeeding. Will execute after a concurrent sendRequest() call completes.
-
waitForConnection
Wait for the completion of a previously sent request, initiate connection to the assigned remote query processor, and return the connection object.- Returns:
- The resulting QueryProcessorConnection. Note: May be invoked anytime after sendRequest has completed, from any thread.
- Throws:
RemoteQueryException
- if an error occurs waiting for the worker connection
-
waitForConnectionDetails
QueryProcessorConnectionDetails waitForConnectionDetails()Wait for the processor's connection details- Returns:
- the deserialized JSON structure returned by the request
-