Class JobUpdateTimeoutCommandImpl
- All Implemented Interfaces:
CommandWithCommunicationApiStep<UpdateTimeoutJobCommandStep1>
,CommandWithOperationReferenceStep<UpdateTimeoutJobCommandStep1.UpdateTimeoutJobCommandStep2>
,FinalCommandStep<UpdateTimeoutJobResponse>
,UpdateTimeoutJobCommandStep1
,UpdateTimeoutJobCommandStep1.UpdateTimeoutJobCommandStep2
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.client.api.command.UpdateTimeoutJobCommandStep1
UpdateTimeoutJobCommandStep1.UpdateTimeoutJobCommandStep2
-
Constructor Summary
ConstructorsConstructorDescriptionJobUpdateTimeoutCommandImpl
(GatewayGrpc.GatewayStub asyncStub, long jobKey, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, boolean preferRestOverGrpc, JsonMapper jsonMapper) -
Method Summary
Modifier and TypeMethodDescriptionoperationReference
(long operationReference) Set the Operation Reference.requestTimeout
(Duration requestTimeout) Sets the request timeout for the command.send()
Sends the command to the Zeebe broker.timeout
(long timeout) Set the timeout of this job.Set the timeout of this job.useGrpc()
Experimental: This method is under development, and as such using it may have no effect on the command builder when called.useRest()
Experimental: This method is under development, and as such using it may have no effect on the command builder when called.
-
Constructor Details
-
JobUpdateTimeoutCommandImpl
public JobUpdateTimeoutCommandImpl(GatewayGrpc.GatewayStub asyncStub, long jobKey, Duration requestTimeout, Predicate<CredentialsProvider.StatusCode> retryPredicate, HttpClient httpClient, boolean preferRestOverGrpc, JsonMapper jsonMapper)
-
-
Method Details
-
timeout
Description copied from interface:UpdateTimeoutJobCommandStep1
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:
timeout
in interfaceUpdateTimeoutJobCommandStep1
- Parameters:
timeout
- the timeout of this job- Returns:
- the builder for this command. Call
invalid reference
#send()
-
timeout
Description copied from interface:UpdateTimeoutJobCommandStep1
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:
timeout
in interfaceUpdateTimeoutJobCommandStep1
- Parameters:
timeout
- the time as duration (e.g. "Duration.ofMinutes(5)")- Returns:
- the builder for this command. Call
invalid reference
#send()
-
requestTimeout
Description copied from interface:FinalCommandStep
Sets the request timeout for the command. The default request timeout can be configured usingZeebeClientBuilder.defaultRequestTimeout(Duration)
.- Specified by:
requestTimeout
in interfaceFinalCommandStep<UpdateTimeoutJobResponse>
- 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: '>' future = command.send(); JobEvent event = future.join();
- Specified by:
send
in interfaceFinalCommandStep<UpdateTimeoutJobResponse>
- Returns:
- a future tracking state of success/failure of the command.
-
operationReference
public UpdateTimeoutJobCommandStep1.UpdateTimeoutJobCommandStep2 operationReference(long operationReference) Description copied from interface:CommandWithOperationReferenceStep
Set the Operation Reference.This is a key chosen by the user and will be part of all records resulted from this operation
- Specified by:
operationReference
in interfaceCommandWithOperationReferenceStep<UpdateTimeoutJobCommandStep1.UpdateTimeoutJobCommandStep2>
- Parameters:
operationReference
- a reference key chosen by the user and will be part of all records resulted from this operation- Returns:
- the builder for this command with the operation reference specified
-
useRest
Description copied from interface:CommandWithCommunicationApiStep
Experimental: This method is under development, and as such using it may have no effect on the command builder when called. While unimplemented, it simply returns the command builder instance unchanged. This method already exists for software that is building support for a REST API in Zeebe, and already wants to use this API during its development. As support for REST is added to Zeebe, each of the commands that implement this method may start to take effect. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Sets REST as the communication API for this command. If this command doesn't support communication over REST, it simply returns the command builder instance unchanged. The default communication API can be configured using
ZeebeClientBuilder.preferRestOverGrpc(boolean)
.- Specified by:
useRest
in interfaceCommandWithCommunicationApiStep<UpdateTimeoutJobCommandStep1>
- Returns:
- the configured command
-
useGrpc
Description copied from interface:CommandWithCommunicationApiStep
Experimental: This method is under development, and as such using it may have no effect on the command builder when called. While unimplemented, it simply returns the command builder instance unchanged. This method already exists for software that is building support for a REST API in Zeebe, and already wants to use this API during its development. As support for REST is added to Zeebe, each of the commands that implement this method may start to take effect. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Sets gRPC as the communication API for this command. If this command doesn't support communication over gRPC, it simply returns the command builder instance unchanged. The default communication API can be configured using
ZeebeClientBuilder.preferRestOverGrpc(boolean)
.- Specified by:
useGrpc
in interfaceCommandWithCommunicationApiStep<UpdateTimeoutJobCommandStep1>
- Returns:
- the configured command
-