标签:javascrip ber ati container bre 模式 同步 应该 prope
我们可以通过JobBuilder创建job
默认job 的名称为job
Job job = new JobBuilder()
.named("myJob")
.build();
?
// Or
?
Job job = JobBuilder.aNewJob()
.named("myJob")
.build();
//Either by calling the job directly
JobReport jobReport = job.call();
?
// Or using the org.easybatch.core.job.JobExecutor API
JobExecutor jobExecutor = new JobExecutor();
JobReport jobReport = jobExecutor.execute(job);
?
// Or using a java.util.concurrent.ExecutorService
ExecutorService executorService = ..;
JobReport jobReport = executorService.submit(job).get();
// Using the org.easybatch.core.job.JobExecutor API
JobExecutor jobExecutor = new JobExecutor();
Future<JobReport> jobReport = jobExecutor.submit(job);
?
// Or using a java.util.concurrent.ExecutorService
ExecutorService executorService = ..;
Future<JobReport> jobReport = executorService.submit(job);
来自官方文档
Job job = JobBuilder.aNewJob()
.batchSize(50)
.errorThreshold(10)
.enableJmx(true)
.enableBatchScanning(true)
.build();
https://github.com/j-easy/easy-batch/wiki/job-configuration
标签:javascrip ber ati container bre 模式 同步 应该 prope
原文地址:https://www.cnblogs.com/rongfengliang/p/12728542.html