Package org.springframework.batch.core.partition

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


  }

  @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

  @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

  }

  @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

        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

Related Classes of org.springframework.batch.core.partition.PartitionHandler

Copyright © 2018 www.massapicom. 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.