Tabnine Logo
TaskExecutorPartitionHandler.setTaskExecutor
Code IndexAdd Tabnine to your IDE (free)

How to use
setTaskExecutor
method
in
org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler

Best Java code snippets using org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler.setTaskExecutor (Showing top 11 results out of 315)

origin: spring-projects/spring-batch

@Test
public void testSetTaskExecutor() throws Exception {
  handler.setTaskExecutor(new SimpleAsyncTaskExecutor());
  handler.handle(stepExecutionSplitter, stepExecution);
  assertEquals(1, count);
}
origin: spring-projects/spring-batch

@Test
public void testTaskExecutorFailure() throws Exception {
  handler.setGridSize(2);
  handler.setTaskExecutor(new TaskExecutor() {
    @Override
    public void execute(Runnable task) {
      if (count > 0) {
        throw new TaskRejectedException("foo");
      }
      task.run();
    }
  });
  Collection<StepExecution> executions = handler.handle(stepExecutionSplitter, stepExecution);
  new DefaultStepExecutionAggregator().aggregate(stepExecution, executions);
  assertEquals(1, count);
  assertEquals(ExitStatus.FAILED.getExitCode(), stepExecution.getExitStatus().getExitCode());
}
origin: spring-projects/spring-batch

partitionHandler.setTaskExecutor(taskExecutor);
step.setPartitionHandler(partitionHandler);
origin: spring-projects/spring-batch

partitionHandler.setTaskExecutor(getTaskExecutor());
step.setPartitionHandler(partitionHandler);
origin: org.springframework.batch/org.springframework.batch.core

private void configurePartitionStep(PartitionStep ts) {
  Assert.state(partitioner != null, "A Partitioner must be provided for a partition step");
  Assert.state(step != null, "A Step must be provided for a partition step");
  configureAbstractStep(ts);
  if (partitionHandler != null) {
    ts.setPartitionHandler(partitionHandler);
  }
  else {
    TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
    partitionHandler.setStep(step);
    if (taskExecutor == null) {
      taskExecutor = new SyncTaskExecutor();
    }
    partitionHandler.setGridSize(gridSize);
    partitionHandler.setTaskExecutor(taskExecutor);
    ts.setPartitionHandler(partitionHandler);
  }
  SimpleStepExecutionSplitter splitter = new SimpleStepExecutionSplitter(jobRepository, step, partitioner);
  ts.setStepExecutionSplitter(splitter);
}
origin: org.springframework.batch/spring-batch-core

partitionHandler.setTaskExecutor(taskExecutor);
step.setPartitionHandler(partitionHandler);
origin: apache/servicemix-bundles

partitionHandler.setTaskExecutor(taskExecutor);
step.setPartitionHandler(partitionHandler);
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

partitionHandler.setTaskExecutor(taskExecutor);
step.setPartitionHandler(partitionHandler);
origin: org.springframework.batch/spring-batch-core

partitionHandler.setTaskExecutor(getTaskExecutor());
step.setPartitionHandler(partitionHandler);
origin: apache/servicemix-bundles

partitionHandler.setTaskExecutor(getTaskExecutor());
step.setPartitionHandler(partitionHandler);
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

partitionHandler.setTaskExecutor(getTaskExecutor());
step.setPartitionHandler(partitionHandler);
org.springframework.batch.core.partition.supportTaskExecutorPartitionHandlersetTaskExecutor

Javadoc

Setter for the TaskExecutor that is used to farm out step executions to multiple threads.

Popular methods of TaskExecutorPartitionHandler

  • <init>
  • setGridSize
    Passed to the StepExecutionSplitter in the #handle(StepExecutionSplitter,StepExecution) method, inst
  • setStep
    Setter for the Step that will be used to execute the partitioned StepExecution. This is a regular Sp
  • createTask
    Creates the task executing the given step in the context of the given execution.
  • getGridSize
  • afterPropertiesSet
  • handle

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Kernel (java.awt.image)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Collectors (java.util.stream)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now