Tabnine Logo
TaskExecutorPartitionHandler.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler
constructor

Best Java code snippets using org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler.<init> (Showing top 12 results out of 315)

origin: spring-projects/spring-batch

@Test
public void testNullStep() throws Exception {
  handler = new TaskExecutorPartitionHandler();
  try {
    handler.handle(stepExecutionSplitter, stepExecution);
    fail("Expected IllegalArgumentException");
  }
  catch (IllegalArgumentException e) {
    // expected
    String message = e.getMessage();
    assertTrue("Wrong message: " + message, message.contains("Step"));
  }
}
origin: spring-projects/spring-batch

@Test
public void testConfiguration() throws Exception {
  handler = new TaskExecutorPartitionHandler();
  try {
    handler.afterPropertiesSet();
    fail("Expected IllegalStateException when no step is set");
  }
  catch (IllegalStateException e) {
    // expected
    String message = e.getMessage();
    assertEquals("Wrong message: " + message, "A Step must be provided.", message);
  }
}
origin: spring-projects/spring-batch

TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
partitionHandler.setStep(this.step);
if (taskExecutor == null) {
origin: spring-projects/spring-batch

@Test
public void testPartitionStepWithProxyHandler() throws Exception {
  StepParserStepFactoryBean<Object, Object> fb = new StepParserStepFactoryBean<>();
  fb.setBeanName("step1");
  fb.setAllowStartIfComplete(true);
  fb.setJobRepository(new JobRepositorySupport());
  fb.setStartLimit(5);
  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);
  Object handler = ReflectionTestUtils.getField(step, "partitionHandler");
  assertTrue(handler instanceof Advised);
}
origin: spring-projects/spring-batch

TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
partitionHandler.setStep(getStep());
if (getTaskExecutor() == null) {
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: apache/servicemix-bundles

TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
partitionHandler.setStep(this.step);
if (taskExecutor == null) {
origin: org.springframework.batch/spring-batch-core

TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
partitionHandler.setStep(this.step);
if (taskExecutor == null) {
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
partitionHandler.setStep(this.step);
if (taskExecutor == null) {
origin: org.springframework.batch/spring-batch-core

TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
partitionHandler.setStep(getStep());
if (getTaskExecutor() == null) {
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
partitionHandler.setStep(getStep());
if (getTaskExecutor() == null) {
origin: apache/servicemix-bundles

TaskExecutorPartitionHandler partitionHandler = new TaskExecutorPartitionHandler();
partitionHandler.setStep(getStep());
if (getTaskExecutor() == null) {
org.springframework.batch.core.partition.supportTaskExecutorPartitionHandler<init>

Popular methods of TaskExecutorPartitionHandler

  • 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
  • setTaskExecutor
    Setter for the TaskExecutor that is used to farm out step executions to multiple threads.
  • createTask
    Creates the task executing the given step in the context of the given execution.
  • getGridSize
  • afterPropertiesSet
  • handle

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Vim plugins
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