Package io.zeebe.client.impl.command
Class JobUpdateRetriesCommandImpl
- java.lang.Object
-
- io.zeebe.client.impl.command.JobUpdateRetriesCommandImpl
-
- All Implemented Interfaces:
FinalCommandStep<UpdateRetriesJobResponse>
,UpdateRetriesJobCommandStep1
,UpdateRetriesJobCommandStep1.UpdateRetriesJobCommandStep2
public final class JobUpdateRetriesCommandImpl extends Object implements UpdateRetriesJobCommandStep1, UpdateRetriesJobCommandStep1.UpdateRetriesJobCommandStep2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.zeebe.client.api.command.UpdateRetriesJobCommandStep1
UpdateRetriesJobCommandStep1.UpdateRetriesJobCommandStep2
-
-
Constructor Summary
Constructors Constructor Description JobUpdateRetriesCommandImpl(GatewayGrpc.GatewayStub asyncStub, long jobKey, Duration requestTimeout, Predicate<Throwable> retryPredicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FinalCommandStep<UpdateRetriesJobResponse>
requestTimeout(Duration requestTimeout)
Sets the request timeout for the command.UpdateRetriesJobCommandStep1.UpdateRetriesJobCommandStep2
retries(int retries)
Set the retries of this job.ZeebeFuture<UpdateRetriesJobResponse>
send()
Sends the command to the Zeebe broker.
-
-
-
Constructor Detail
-
JobUpdateRetriesCommandImpl
public JobUpdateRetriesCommandImpl(GatewayGrpc.GatewayStub asyncStub, long jobKey, Duration requestTimeout, Predicate<Throwable> retryPredicate)
-
-
Method Detail
-
retries
public UpdateRetriesJobCommandStep1.UpdateRetriesJobCommandStep2 retries(int retries)
Description copied from interface:UpdateRetriesJobCommandStep1
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:
retries
in interfaceUpdateRetriesJobCommandStep1
- Parameters:
retries
- the retries of this job- Returns:
- the builder for this command. Call
#send()
to complete the command and send it to the broker.
-
requestTimeout
public FinalCommandStep<UpdateRetriesJobResponse> requestTimeout(Duration 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<UpdateRetriesJobResponse>
- Parameters:
requestTimeout
- the request timeout- Returns:
- the configured command
-
send
public ZeebeFuture<UpdateRetriesJobResponse> 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<JobEvent> future = command.send(); JobEvent event = future.join();
- Specified by:
send
in interfaceFinalCommandStep<UpdateRetriesJobResponse>
- Returns:
- a future tracking state of success/failure of the command.
-
-