Class LongTaskRpc


  • public class LongTaskRpc
    extends Object
    Makes remote calls to the LongTaskService
    Since:
    6.13.0
    • Method Detail

      • doLongTaskAndWaitForResult

        public boolean doLongTaskAndWaitForResult​(Supplier<LongTaskSubmission> longTaskSubmissionSupplier,
                                                  String failureMessage)
        Fetches the LongTaskSubmission from the supplier and polls the LongTaskService until the task finishes or the poller times out (whichever comes first)
        Parameters:
        longTaskSubmissionSupplier -
        failureMessage -
        Returns:
        whether or not the long running task completed successfully within the timeout
      • waitForLongTaskResult

        public boolean waitForLongTaskResult​(String taskId,
                                             String failureMessage)
        Polls the LongTaskService until the task finishes or the poller times out (whichever comes first)
        Parameters:
        taskId -
        failureMessage -
        Returns:
        whether or not the long running task completed successfully within the timeout