public class BatchBuilder extends Object
Modifier and Type | Field and Description |
---|---|
protected CommandContext |
commandContext |
protected BatchConfiguration |
config |
protected OperationLogHandler |
operationLogHandler |
protected OperationLogInstanceCountHandler |
operationLogInstanceCountHandler |
protected Permission |
permission |
protected PermissionHandler |
permissionHandler |
protected String |
tenantId |
protected Integer |
totalJobsCount |
protected String |
type |
Constructor and Description |
---|
BatchBuilder(CommandContext commandContext) |
Modifier and Type | Method and Description |
---|---|
Batch |
build() |
protected int |
calculateInvocationsPerBatchJob(String batchType) |
protected int |
calculateTotalJobs(int instanceCount,
int invocationPerBatchJobCount) |
protected void |
checkPermissions() |
BatchBuilder |
config(BatchConfiguration config) |
protected BatchEntity |
configure(BatchEntity batch) |
BatchBuilder |
operationLogHandler(OperationLogHandler operationLogHandler) |
BatchBuilder |
operationLogHandler(OperationLogInstanceCountHandler operationLogHandler) |
BatchBuilder |
permission(Permission permission) |
BatchBuilder |
permissionHandler(PermissionHandler permissionCheckHandler) |
protected void |
save(BatchEntity batch) |
protected void |
setTotalJobs(BatchEntity batch,
int invocationPerBatchJobCount) |
BatchBuilder |
tenantId(String tenantId) |
BatchBuilder |
totalJobs(int totalJobsCount) |
BatchBuilder |
type(String batchType) |
protected void |
writeOperationLog() |
protected CommandContext commandContext
protected BatchConfiguration config
protected String tenantId
protected String type
protected Integer totalJobsCount
protected Permission permission
protected PermissionHandler permissionHandler
protected OperationLogInstanceCountHandler operationLogInstanceCountHandler
protected OperationLogHandler operationLogHandler
public BatchBuilder(CommandContext commandContext)
public BatchBuilder tenantId(String tenantId)
public BatchBuilder config(BatchConfiguration config)
public BatchBuilder type(String batchType)
public BatchBuilder totalJobs(int totalJobsCount)
public BatchBuilder permission(Permission permission)
public BatchBuilder permissionHandler(PermissionHandler permissionCheckHandler)
public BatchBuilder operationLogHandler(OperationLogInstanceCountHandler operationLogHandler)
public BatchBuilder operationLogHandler(OperationLogHandler operationLogHandler)
public Batch build()
protected void checkPermissions()
protected BatchEntity configure(BatchEntity batch)
protected void setTotalJobs(BatchEntity batch, int invocationPerBatchJobCount)
protected void save(BatchEntity batch)
protected void writeOperationLog()
protected int calculateTotalJobs(int instanceCount, int invocationPerBatchJobCount)
protected int calculateInvocationsPerBatchJob(String batchType)
Copyright © 2022. All rights reserved.