Package org.springframework.batch.repeat.support

Examples of org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate$ResultQueueInternalState


    if (stepOperations == null) {

      stepOperations = new RepeatTemplate();

      if (taskExecutor != null) {
        TaskExecutorRepeatTemplate repeatTemplate = new TaskExecutorRepeatTemplate();
        repeatTemplate.setTaskExecutor(taskExecutor);
        repeatTemplate.setThrottleLimit(throttleLimit);
        stepOperations = repeatTemplate;
      }

      ((RepeatTemplate) stepOperations).setExceptionHandler(exceptionHandler);
View Full Code Here


    if (getStepOperations() == null) {

      stepOperations(new RepeatTemplate());

      if (getTaskExecutor() != null) {
        TaskExecutorRepeatTemplate repeatTemplate = new TaskExecutorRepeatTemplate();
        repeatTemplate.setTaskExecutor(getTaskExecutor());
        repeatTemplate.setThrottleLimit(getThrottleLimit());
        stepOperations(repeatTemplate);
      }

      ((RepeatTemplate) getStepOperations()).setExceptionHandler(getExceptionHandler());
View Full Code Here

    if (getStepOperations() == null) {

      stepOperations(new RepeatTemplate());

      if (getTaskExecutor() != null) {
        TaskExecutorRepeatTemplate repeatTemplate = new TaskExecutorRepeatTemplate();
        repeatTemplate.setTaskExecutor(getTaskExecutor());
        repeatTemplate.setThrottleLimit(getThrottleLimit());
        stepOperations(repeatTemplate);
      }

      ((RepeatTemplate) getStepOperations()).setExceptionHandler(getExceptionHandler());
View Full Code Here

    // The after is not executed, if there is an error...
    assertEquals("[2]", calls.toString());
  }

  public void testAsynchronousOnErrorInterceptorsPrecedence() throws Exception {
    TaskExecutorRepeatTemplate template = new TaskExecutorRepeatTemplate();
    template.setTaskExecutor(new SimpleAsyncTaskExecutor());
    final List<Object> calls = new ArrayList<Object>();
    final List<Object> fails = new ArrayList<Object>();
    template.setListeners(new RepeatListener[] { new RepeatListenerSupport() {
            @Override
      public void after(RepeatContext context, RepeatStatus result) {
        calls.add("1");
      }
    }, new RepeatListenerSupport() {
            @Override
      public void onError(RepeatContext context, Throwable t) {
        calls.add("2");
        fails.add("2");
      }
    } });
    try {
      template.iterate(new RepeatCallback() {
                @Override
        public RepeatStatus doInIteration(RepeatContext context) throws Exception {
          throw new IllegalStateException("Bogus");
        }
      });
View Full Code Here

        chunkTemplate));

    jobRepository = new JobRepositorySupport();
    step.setJobRepository(jobRepository);

    TaskExecutorRepeatTemplate template = new TaskExecutorRepeatTemplate();
    template.setThrottleLimit(throttleLimit);
    SimpleAsyncTaskExecutor taskExecutor = new SimpleAsyncTaskExecutor();
    taskExecutor.setConcurrencyLimit(concurrencyLimit);
    template.setTaskExecutor(taskExecutor);
    step.setStepOperations(template);

    step.registerStream(new ItemStreamSupport() {
      private int count = 0;
View Full Code Here

    chunkOperations = new RepeatTemplate();
    chunkOperations.setCompletionPolicy(new SimpleCompletionPolicy(1));

    job = new JobSupport("FOO");

    TaskExecutorRepeatTemplate repeatTemplate = new TaskExecutorRepeatTemplate();
    repeatTemplate.setThrottleLimit(2);
    repeatTemplate.setTaskExecutor(new SimpleAsyncTaskExecutor());
    step.setStepOperations(repeatTemplate);
    step.setTransactionManager(transactionManager);
  }
View Full Code Here

    if (getStepOperations() == null) {

      stepOperations(new RepeatTemplate());

      if (getTaskExecutor() != null) {
        TaskExecutorRepeatTemplate repeatTemplate = new TaskExecutorRepeatTemplate();
        repeatTemplate.setTaskExecutor(getTaskExecutor());
        repeatTemplate.setThrottleLimit(getThrottleLimit());
        stepOperations(repeatTemplate);
      }

      ((RepeatTemplate) getStepOperations()).setExceptionHandler(getExceptionHandler());
View Full Code Here

TOP

Related Classes of org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate$ResultQueueInternalState

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.