Package io.camunda.client.impl.util
Class JobWorkerExecutors
java.lang.Object
io.camunda.client.impl.util.JobWorkerExecutors
- All Implemented Interfaces:
AutoCloseable
Executor services to be used by the job worker framework.
scheduledExecutor is dedicated for scheduled tasks such as job
polling or stream connection management.
jobHandlingExecutor is a dedicated executor for job handling only.
Each executorService may or may not be owned by the Camunda Client Job framework, indicated by
ownsScheduledExecutorResource for the scheduledExecutor or by the
ownsJobHandlingExecutor flag for the jobHandlingExecutor. If flagged
as owned, then close() will shut down the service. Otherwise it's a
no-op.
-
Constructor Summary
ConstructorsConstructorDescriptionJobWorkerExecutors(ScheduledExecutorService executor, boolean ownsResource) JobWorkerExecutors(ScheduledExecutorService executor, boolean ownsResource, ExecutorService jobHandlingExecutor, boolean ownsJobHandlingExecutor) -
Method Summary
-
Constructor Details
-
JobWorkerExecutors
-
JobWorkerExecutors
public JobWorkerExecutors(ScheduledExecutorService executor, boolean ownsResource, ExecutorService jobHandlingExecutor, boolean ownsJobHandlingExecutor)
-
-
Method Details
-
scheduledExecutor
-
jobHandlingExecutor
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-