public class MigrationBatchJobHandler extends Object implements BatchJobHandler<MigrationBatchConfiguration>
Modifier and Type | Field and Description |
---|---|
static MigrationBatchJobDeclaration |
JOB_DECLARATION |
Constructor and Description |
---|
MigrationBatchJobHandler() |
Modifier and Type | Method and Description |
---|---|
protected JobEntity |
createBatchJob(BatchEntity batch,
ByteArrayEntity configuration) |
boolean |
createJobs(BatchEntity batch)
Creates batch jobs for a batch.
|
void |
deleteJobs(BatchEntity batch)
Delete all jobs for a batch.
|
void |
execute(BatchJobConfiguration configuration,
ExecutionEntity execution,
CommandContext commandContext,
String tenantId) |
JobDeclaration<?,MessageEntity> |
getJobDeclaration()
Get the job declaration for batch jobs.
|
protected ProcessDefinitionEntity |
getProcessDefinition(CommandContext commandContext,
String processDefinitionId) |
String |
getType() |
BatchJobConfiguration |
newConfiguration(String canonicalString) |
void |
onDelete(BatchJobConfiguration configuration,
JobEntity jobEntity)
Clean up before job is deleted.
|
MigrationBatchConfiguration |
readConfiguration(byte[] serializedConfiguration)
Read the serialized configuration of the batch.
|
protected ByteArrayEntity |
saveConfiguration(ByteArrayManager byteArrayManager,
MigrationBatchConfiguration jobConfiguration) |
byte[] |
writeConfiguration(MigrationBatchConfiguration configuration)
Converts the configuration of the batch to a byte array.
|
public static final MigrationBatchJobDeclaration JOB_DECLARATION
public String getType()
getType
in interface JobHandler<BatchJobConfiguration>
public JobDeclaration<?,MessageEntity> getJobDeclaration()
BatchJobHandler
getJobDeclaration
in interface BatchJobHandler<MigrationBatchConfiguration>
public byte[] writeConfiguration(MigrationBatchConfiguration configuration)
BatchJobHandler
writeConfiguration
in interface BatchJobHandler<MigrationBatchConfiguration>
configuration
- the configuration objectpublic MigrationBatchConfiguration readConfiguration(byte[] serializedConfiguration)
BatchJobHandler
readConfiguration
in interface BatchJobHandler<MigrationBatchConfiguration>
serializedConfiguration
- the serialized configurationpublic boolean createJobs(BatchEntity batch)
BatchJobHandler
createJobs
in interface BatchJobHandler<MigrationBatchConfiguration>
batch
- the batch to create jobs forprotected ByteArrayEntity saveConfiguration(ByteArrayManager byteArrayManager, MigrationBatchConfiguration jobConfiguration)
protected JobEntity createBatchJob(BatchEntity batch, ByteArrayEntity configuration)
public void deleteJobs(BatchEntity batch)
BatchJobHandler
deleteJobs
in interface BatchJobHandler<MigrationBatchConfiguration>
batch
- the batch to delete jobs forpublic void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId)
execute
in interface JobHandler<BatchJobConfiguration>
public BatchJobConfiguration newConfiguration(String canonicalString)
newConfiguration
in interface JobHandler<BatchJobConfiguration>
public void onDelete(BatchJobConfiguration configuration, JobEntity jobEntity)
JobHandler
onDelete
in interface JobHandler<BatchJobConfiguration>
configuration
- the job handler configurationjobEntity
- the job entity to be deletedprotected ProcessDefinitionEntity getProcessDefinition(CommandContext commandContext, String processDefinitionId)
Copyright © 2017. All rights reserved.