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 Details

    • sendRequest

      QueryDispatcherConnection.QueryProcessorRequestHandle sendRequest(RemoteProcessingRequest request, boolean exportQueryScope, List<RemoteQueryClassDefinition> classList, long timeoutMillis, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, @NotNull io.deephaven.enterprise.auth.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 -
      Returns:
      This object, to allow for chained methods.
      Throws:
      RemoteQueryException
    • sendRequestCancellation

      default void sendRequestCancellation() throws RemoteQueryException
      Delegate to QueryDispatcherConnection.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

      default void sendRequestCancellation(boolean ignoreMissingJob) throws RemoteQueryException
      Delegate to QueryDispatcherConnection.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