@Override public boolean processData(final JobExecutionMultipleShardingContext context, final Foo data) { printContext.printProcessDataMessage(data); if (9 == data.getId() % 10) { return false; } fooRepository.setInactive(data.getId()); return true; }
@Override public void process(final JobExecutionMultipleShardingContext context) { printContext.printProcessJobMessage(context.getShardingItems()); fooRepository.findActive(context.getShardingItems()); // do something }
@Override public List<Foo> fetchData(final JobExecutionMultipleShardingContext context) { printContext.printFetchDataMessage(context.getShardingItems()); return fooRepository.findActive(context.getShardingItems()); }