Interface BatchJobHandler<T>
- All Superinterfaces:
JobHandler<BatchJobConfiguration>
- All Known Implementing Classes:
AbstractBatchJobHandler,BatchSetRemovalTimeJobHandler,BatchSetVariablesHandler,DecisionSetRemovalTimeJobHandler,DeleteHistoricDecisionInstancesJobHandler,DeleteHistoricProcessInstancesJobHandler,DeleteProcessInstancesJobHandler,MessageCorrelationBatchJobHandler,MigrationBatchJobHandler,ModificationBatchJobHandler,ProcessSetRemovalTimeJobHandler,RestartProcessInstancesJobHandler,SetExternalTaskRetriesJobHandler,SetJobRetriesJobHandler,UpdateProcessInstancesSuspendStateJobHandler
A batch job handler manages batch jobs based
on the configuration
BatchJobHandler.
Used by a seed job to manage lifecycle of execution jobs.-
Method Summary
Modifier and TypeMethodDescriptionintcalculateInvocationsPerBatchJob(String batchType, T configuration) Determine the number of invocations ber patch job.booleancreateJobs(BatchEntity batch) Creates batch jobs for a batch.voiddeleteJobs(BatchEntity batch) Delete all jobs for a batch.Get the job declaration for batch jobs.readConfiguration(byte[] serializedConfiguration) Read the serialized configuration of the batch.byte[]writeConfiguration(T configuration) Converts the configuration of the batch to a byte array.Methods inherited from interface org.camunda.bpm.engine.impl.jobexecutor.JobHandler
execute, getType, newConfiguration, onDelete
-
Method Details
-
writeConfiguration
Converts the configuration of the batch to a byte array.- Parameters:
configuration- the configuration object- Returns:
- the serialized configuration
-
readConfiguration
Read the serialized configuration of the batch.- Parameters:
serializedConfiguration- the serialized configuration- Returns:
- the deserialized configuration object
-
getJobDeclaration
JobDeclaration<?,MessageEntity> getJobDeclaration()Get the job declaration for batch jobs.- Returns:
- the batch job declaration
-
createJobs
Creates batch jobs for a batch.- Parameters:
batch- the batch to create jobs for- Returns:
- true of no more jobs have to be created for this batch, false otherwise
-
deleteJobs
Delete all jobs for a batch.- Parameters:
batch- the batch to delete jobs for
-
calculateInvocationsPerBatchJob
Determine the number of invocations ber patch job. This can be defined by the related batch job handler specifically or otherwise taken from the engine configuration.- Parameters:
batchType- the batch's type to help determine any engine configuration related to itconfiguration- the configuration object- Returns:
- the number of invocations ber patch job
-