Interface WorkerResult.Failure

All Superinterfaces:
WorkerResult
Enclosing interface:
WorkerResult

public static non-sealed interface WorkerResult.Failure extends WorkerResult
A failure result. It allows for configuring the failure details. Can be created via WorkerResultBuilder.failure()
  • Method Details

    • error

      WorkerResult.Failure error(Exception exception)
      Provide fail information based on the exception. The Throwable.getMessage() will be used as the failure message and the exception stacktrace will be used as the details.
      Parameters:
      exception - the exception that should be used to provide the message and details
      See Also:
    • message

      WorkerResult.Failure message(String message)
      The failure message that should be passed to the Flowable application.
      Parameters:
      message - the failure message
    • details

      WorkerResult.Failure details(String details)
      The failure details that should be passed to the Flowable application.
      Parameters:
      details - the failure details
    • retries

      WorkerResult.Failure retries(int retries)
      How many times should the job be retried. This can be used to increase / decrease the existing retries of a job. When nothing is set then the Flowable application is going to decrease the retries by 1.
      Parameters:
      retries - the new retry count for the job
    • retryTimeout

      WorkerResult.Failure retryTimeout(Duration retryTimeout)
      How long should the Flowable application wait before making this job available for execution. This can be used to set a specific period after which the execution of a job would be successful.
      Parameters:
      retryTimeout - the period that the Flowable application should wait before making this job available