Class JobUpdateCommandImpl

java.lang.Object
io.camunda.zeebe.client.impl.command.JobUpdateCommandImpl
All Implemented Interfaces:
FinalCommandStep<UpdateJobResponse>, UpdateJobCommandStep1, UpdateJobCommandStep1.UpdateJobCommandStep2

public class JobUpdateCommandImpl extends Object implements UpdateJobCommandStep1, UpdateJobCommandStep1.UpdateJobCommandStep2
  • Constructor Details

    • JobUpdateCommandImpl

      public JobUpdateCommandImpl(long jobKey, HttpClient httpClient, JsonMapper jsonMapper)
  • Method Details

    • requestTimeout

      public FinalCommandStep<UpdateJobResponse> requestTimeout(Duration requestTimeout)
      Description copied from interface: FinalCommandStep
      Sets the request timeout for the command. The default request timeout can be configured using ZeebeClientBuilder.defaultRequestTimeout(Duration).
      Specified by:
      requestTimeout in interface FinalCommandStep<UpdateJobResponse>
      Parameters:
      requestTimeout - the request timeout
      Returns:
      the configured command
    • send

      Description copied from interface: FinalCommandStep
      Sends the command to the Zeebe broker. This operation is asynchronous. In case of success, the future returns the event that was generated by the Zeebe broker in response to the command.

      Call ZeebeFuture.join() to wait until the response is available.

       Future<JobEventinvalid input: '&#62' future = command.send();
       JobEvent event = future.join();
       
      Specified by:
      send in interface FinalCommandStep<UpdateJobResponse>
      Returns:
      a future tracking state of success/failure of the command.
    • update

      Description copied from interface: UpdateJobCommandStep1
      Update the retries and/or the timeout of this job.

      If the given retries are greater than zero then this job will be picked up again by a job subscription and a related incident will be marked as resolved.

      Timeout value passed as a duration is used to calculate a new job deadline. This will happen when the command is processed. The timeout value will be added to the current time then.

      Specified by:
      update in interface UpdateJobCommandStep1
      Parameters:
      jobChangeset - the changeset of this job, if a field is not provided (equals to null) it will be not updated
      Returns:
      the builder for this command. Call
      invalid reference
      #send()
      to complete the command and send it to the broker.
    • update

      public UpdateJobCommandStep1.UpdateJobCommandStep2 update(Integer retries, Long timeout)
      Description copied from interface: UpdateJobCommandStep1
      Update the retries and/or the timeout of this job.

      If the given retries are greater than zero then this job will be picked up again by a job subscription and a related incident will be marked as resolved.

      Timeout value passed as a duration is used to calculate a new job deadline. This will happen when the command is processed. The timeout value will be added to the current time then.

      Specified by:
      update in interface UpdateJobCommandStep1
      Parameters:
      retries - retries the retries of this job, if null it won't be updated
      timeout - the time the timeout of this job, if null it won't be updated
      Returns:
      the builder for this command. Call
      invalid reference
      #send()
      to complete the command and send it to the broker.
    • updateRetries

      public UpdateJobCommandStep1.UpdateJobCommandStep2 updateRetries(int retries)
      Description copied from interface: UpdateJobCommandStep1
      Set the retries of this job.

      If the given retries are greater than zero then this job will be picked up again by a job subscription and a related incident will be marked as resolved.

      Specified by:
      updateRetries in interface UpdateJobCommandStep1
      Parameters:
      retries - the retries of this job
      Returns:
      the builder for this command. Call
      invalid reference
      #send()
      to complete the command and send it to the broker.
    • updateTimeout

      public UpdateJobCommandStep1.UpdateJobCommandStep2 updateTimeout(long timeout)
      Description copied from interface: UpdateJobCommandStep1
      Set the timeout of this job.

      Timeout value in millis is used to calculate a new job deadline. This will happen when the command is processed. The timeout value will be added to the current time then.

      Specified by:
      updateTimeout in interface UpdateJobCommandStep1
      Parameters:
      timeout - the timeout of this job
      Returns:
      the builder for this command. Call
      invalid reference
      #send()
      to complete the command and send it to the broker.
    • updateTimeout

      public UpdateJobCommandStep1.UpdateJobCommandStep2 updateTimeout(Duration timeout)
      Description copied from interface: UpdateJobCommandStep1
      Set the timeout of this job.

      Timeout value passed as a duration is used to calculate a new job deadline. This will happen when the command is processed. The timeout value will be added to the current time then.

      Specified by:
      updateTimeout in interface UpdateJobCommandStep1
      Parameters:
      timeout - the time as duration (e.g. "Duration.ofMinutes(5)")
      Returns:
      the builder for this command. Call
      invalid reference
      #send()
      to complete the command and send it to the broker.