Interface UpdateJobPriorityCommandStep1.UpdateJobPriorityCommandStep2
- All Superinterfaces:
CommandWithOperationReferenceStep<UpdateJobPriorityCommandStep1.UpdateJobPriorityCommandStep2>,FinalCommandStep<UpdateJobPriorityResponse>
- All Known Implementing Classes:
JobUpdatePriorityCommandImpl
- Enclosing interface:
UpdateJobPriorityCommandStep1
-
Method Summary
Modifier and TypeMethodDescriptionwithLeaseToken(String leaseToken) Sets the lease token identifying the job's activation, fencing this command against a superseded activation of the same job.Methods inherited from interface io.camunda.client.api.command.CommandWithOperationReferenceStep
operationReferenceMethods inherited from interface io.camunda.client.api.command.FinalCommandStep
execute, requestTimeout, send
-
Method Details
-
withLeaseToken
Sets the lease token identifying the job's activation, fencing this command against a superseded activation of the same job. Obtain it fromActivatedJob#getLeaseToken().For a leased job, a supplied token is validated to prove the command comes from the worker that holds the current lease; a command carrying a stale token is rejected, fencing the job against a superseded activation (e.g. after the job timed out or failed and was re-activated by another worker). An update without a token always applies, to support operator and bulk updates of leased jobs; this differs from lifecycle commands like complete, fail, and throw-error, which always require a token for leased jobs. A job that was activated without a lease requires no token.
When this command is created from an activated job (e.g.
newUpdateJobPriorityCommand(activatedJob)) the job's lease token is carried automatically, so this method is only needed when building the command from a job key.- Parameters:
leaseToken- the opaque lease token the worker received when the job was activated- Returns:
- the builder for this command. Call
FinalCommandStep.send()to complete the command and send it to the broker.
-