Examples of PartitionHandler


Examples of org.springframework.batch.core.partition.PartitionHandler

  }

  @Test
  public void testVanillaStepExecution() throws Exception {
    step.setStepExecutionSplitter(new SimpleStepExecutionSplitter(jobRepository, true, step.getName(), new SimplePartitioner()));
    step.setPartitionHandler(new PartitionHandler() {
      @Override
      public Collection<StepExecution> handle(StepExecutionSplitter stepSplitter, StepExecution stepExecution)
          throws Exception {
        Set<StepExecution> executions = stepSplitter.split(stepExecution, 2);
        for (StepExecution execution : executions) {
View Full Code Here

Examples of org.springframework.batch.core.partition.PartitionHandler

  }

  @Test
  public void testFailedStepExecution() throws Exception {
    step.setStepExecutionSplitter(new SimpleStepExecutionSplitter(jobRepository, true, step.getName(), new SimplePartitioner()));
    step.setPartitionHandler(new PartitionHandler() {
      @Override
      public Collection<StepExecution> handle(StepExecutionSplitter stepSplitter, StepExecution stepExecution)
          throws Exception {
        Set<StepExecution> executions = stepSplitter.split(stepExecution, 2);
        for (StepExecution execution : executions) {
View Full Code Here

Examples of org.springframework.batch.core.partition.PartitionHandler

  @Test
  public void testRestartStepExecution() throws Exception {
    final AtomicBoolean started = new AtomicBoolean(false);
    step.setStepExecutionSplitter(new SimpleStepExecutionSplitter(jobRepository, true, step.getName(), new SimplePartitioner()));
    step.setPartitionHandler(new PartitionHandler() {
      @Override
      public Collection<StepExecution> handle(StepExecutionSplitter stepSplitter, StepExecution stepExecution)
          throws Exception {
        Set<StepExecution> executions = stepSplitter.split(stepExecution, 2);
        if (!started.get()) {
View Full Code Here

Examples of org.springframework.batch.core.partition.PartitionHandler

  }

  @Test
  public void testStoppedStepExecution() throws Exception {
    step.setStepExecutionSplitter(new SimpleStepExecutionSplitter(jobRepository, true, step.getName(), new SimplePartitioner()));
    step.setPartitionHandler(new PartitionHandler() {
      @Override
      public Collection<StepExecution> handle(StepExecutionSplitter stepSplitter, StepExecution stepExecution)
          throws Exception {
        Set<StepExecution> executions = stepSplitter.split(stepExecution, 2);
        for (StepExecution execution : executions) {
View Full Code Here

Examples of org.springframework.batch.core.partition.PartitionHandler

        super.aggregate(result, executions);
        result.getExecutionContext().put("aggregated", true);
      }
    });
    step.setStepExecutionSplitter(new SimpleStepExecutionSplitter(jobRepository, true, step.getName(), new SimplePartitioner()));
    step.setPartitionHandler(new PartitionHandler() {
      @Override
      public Collection<StepExecution> handle(StepExecutionSplitter stepSplitter, StepExecution stepExecution)
          throws Exception {
        return Arrays.asList(stepExecution);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.