public class ActivateJobsCommandImpl extends Object implements ActivateJobsCommandStep1, ActivateJobsCommandStep1.ActivateJobsCommandStep2, ActivateJobsCommandStep1.ActivateJobsCommandStep3
ActivateJobsCommandStep1.ActivateJobsCommandStep2, ActivateJobsCommandStep1.ActivateJobsCommandStep3
Constructor and Description |
---|
ActivateJobsCommandImpl(GatewayGrpc.GatewayStub asyncStub,
ZeebeClientConfiguration config,
ZeebeObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
ActivateJobsCommandStep1.ActivateJobsCommandStep3 |
amount(int amount)
Set the maximal amount of jobs to activate.
|
ActivateJobsCommandStep1.ActivateJobsCommandStep2 |
jobType(String jobType)
Set the type of jobs to work on.
|
ZeebeFuture<ActivateJobsResponse> |
send()
Sends the command to the Zeebe broker.
|
ActivateJobsCommandStep1.ActivateJobsCommandStep3 |
timeout(java.time.Duration timeout)
Set the time for how long a job is exclusively assigned for this subscription.
|
ActivateJobsCommandStep1.ActivateJobsCommandStep3 |
timeout(long timeout)
Set the time for how long a job is exclusively assigned for this subscription.
|
ActivateJobsCommandStep1.ActivateJobsCommandStep3 |
workerName(String workerName)
Set the name of the job worker.
|
public ActivateJobsCommandImpl(GatewayGrpc.GatewayStub asyncStub, ZeebeClientConfiguration config, ZeebeObjectMapper objectMapper)
public ActivateJobsCommandStep1.ActivateJobsCommandStep2 jobType(String jobType)
ActivateJobsCommandStep1
jobType
in interface ActivateJobsCommandStep1
jobType
- the type of jobs (e.g. "payment")public ActivateJobsCommandStep1.ActivateJobsCommandStep3 amount(int amount)
ActivateJobsCommandStep1.ActivateJobsCommandStep2
amount
in interface ActivateJobsCommandStep1.ActivateJobsCommandStep2
amount
- the maximal number of jobs to activatepublic ActivateJobsCommandStep1.ActivateJobsCommandStep3 timeout(long timeout)
ActivateJobsCommandStep1.ActivateJobsCommandStep3
In this time, the job can not be assigned by other subscriptions to ensure that only one subscription work on the job. When the time is over then the job can be assigned again by this or other subscription if it's not completed yet.
If no timeout is set, then the default is used from the configuration.
timeout
in interface ActivateJobsCommandStep1.ActivateJobsCommandStep3
timeout
- the time in millisecondsFinalCommandStep.send()
to complete the command and send
it to the broker.public ActivateJobsCommandStep1.ActivateJobsCommandStep3 timeout(java.time.Duration timeout)
ActivateJobsCommandStep1.ActivateJobsCommandStep3
In this time, the job can not be assigned by other subscriptions to ensure that only one subscription work on the job. When the time is over then the job can be assigned again by this or other subscription if it's not completed yet.
If no time is set then the default is used from the configuration.
timeout
in interface ActivateJobsCommandStep1.ActivateJobsCommandStep3
timeout
- the time as duration (e.g. "Duration.ofMinutes(5)")FinalCommandStep.send()
to complete the command and send
it to the broker.public ActivateJobsCommandStep1.ActivateJobsCommandStep3 workerName(String workerName)
ActivateJobsCommandStep1.ActivateJobsCommandStep3
This name is used to identify the worker which activated the jobs. Its main purpose is for monitoring and auditing. Commands on activated jobs do not check the worker name, i.e. complete or fail job.
If no name is set then the default is used from the configuration.
workerName
in interface ActivateJobsCommandStep1.ActivateJobsCommandStep3
workerName
- the name of the worker (e.g. "payment-service")FinalCommandStep.send()
to complete the command and send
it to the broker.public ZeebeFuture<ActivateJobsResponse> send()
FinalCommandStep
Call ZeebeFuture.join()
to wait until the response is available.
Future<JobEvent> future = command.send(); JobEvent event = future.join();
send
in interface FinalCommandStep<ActivateJobsResponse>
Copyright © 2017–2018 camunda services GmbH. All rights reserved.