Package org.springframework.batch.core.partition.support

Examples of org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler


    if (partitionHandler != null) {
      step.setPartitionHandler(partitionHandler);
    }
    else {
      TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
      partitionHandler.setStep(this.step);
      if (taskExecutor == null) {
        taskExecutor = new SyncTaskExecutor();
      }
      partitionHandler.setGridSize(gridSize);
      partitionHandler.setTaskExecutor(taskExecutor);
      step.setPartitionHandler(partitionHandler);
    }

    if (splitter != null) {
      step.setStepExecutionSplitter(splitter);
View Full Code Here


      // the partitioned step
      if (stepExecutionName.equalsIgnoreCase("j3s1")) {
        PartitionStep partitionStep = (PartitionStep) this.applicationContext.getBean(stepExecutionName);
        // prove that the reference in the {@link
        // TaskExecutorPartitionHandler} is the step configured inline
        TaskExecutorPartitionHandler taskExecutorPartitionHandler = accessPrivateField(partitionStep,
            "partitionHandler");
        TaskletStep taskletStep = accessPrivateField(taskExecutorPartitionHandler, "step");

        assertNotNull("the taskletStep wasn't configured with a step. "
            + "We're trusting that the factory ensured " + "a reference was given.", taskletStep);
View Full Code Here

        // step
        PartitionStep partitionStep = (PartitionStep) this.applicationContext.getBean(stepExecutionName);

        // prove that the reference in the {@link
        // TaskExecutorPartitionHandler} is the step configured inline
        TaskExecutorPartitionHandler taskExecutorPartitionHandler = accessPrivateField(partitionStep,
            "partitionHandler");
        TaskletStep taskletStep = accessPrivateField(taskExecutorPartitionHandler, "step");

        assertNotNull("the taskletStep wasn't configured with a step. "
            + "We're trusting that the factory ensured " + "a reference was given.", taskletStep);
View Full Code Here

    fb.setListeners(new StepListener[] { new StepExecutionListenerSupport() });
    fb.setTaskExecutor(new SyncTaskExecutor());

    SimplePartitioner partitioner = new SimplePartitioner();
    fb.setPartitioner(partitioner);
    TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
    partitionHandler.setStep(new StepSupport("foo"));
    ProxyFactory factory = new ProxyFactory(partitionHandler);
    fb.setPartitionHandler((PartitionHandler) factory.getProxy());

    Object step = fb.getObject();
    assertTrue(step instanceof PartitionStep);
View Full Code Here

    if (getPartitionHandler() != null) {
      step.setPartitionHandler(getPartitionHandler());
    }
    else {
      TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
      partitionHandler.setStep(getStep());
      if (getTaskExecutor() == null) {
        taskExecutor(new SyncTaskExecutor());
      }
      partitionHandler.setGridSize(getGridSize());
      partitionHandler.setTaskExecutor(getTaskExecutor());
      step.setPartitionHandler(partitionHandler);
    }

    if (getSplitter() != null) {
      step.setStepExecutionSplitter(getSplitter());
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler

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.