Tabnine Logo
BatchRetryTemplate.createState
Code IndexAdd Tabnine to your IDE (free)

How to use
createState
method
in
org.springframework.batch.core.step.item.BatchRetryTemplate

Best Java code snippets using org.springframework.batch.core.step.item.BatchRetryTemplate.createState (Showing top 8 results out of 315)

origin: spring-projects/spring-batch

BatchRetryTemplate.createState(getInputKeys(inputs), rollbackClassifier));
origin: spring-projects/spring-batch

  template.execute(retryCallback, BatchRetryTemplate.createState(outputs));
  fail("Expected RecoverableException");
  template.execute(retryCallback, BatchRetryTemplate.createState(outputs));
  fail("Expected ExhaustedRetryException");
String[] result = template.execute(retryCallback, BatchRetryTemplate.createState(outputs));
assertEquals("[d, c]", Arrays.toString(result));
  template.execute(retryCallback, BatchRetryTemplate.createState(outputs));
  fail("Expected ExhaustedRetryException");
result = template.execute(retryCallback, BatchRetryTemplate.createState(outputs));
assertEquals("[e, f]", Arrays.toString(result));
origin: spring-projects/spring-batch

@Test(expected = ExhaustedRetryException.class)
public void testExhaustedRetry() throws Exception {
  BatchRetryTemplate template = new BatchRetryTemplate();
  template.setRetryPolicy(new SimpleRetryPolicy(1, Collections
      .<Class<? extends Throwable>, Boolean> singletonMap(Exception.class, true)));
  RetryCallback<String[], Exception> retryCallback = new RetryCallback<String[], Exception>() {
    @Override
    public String[] doWithRetry(RetryContext context) throws Exception {
      if (count++ < 2) {
        throw new RecoverableException("Recoverable");
      }
      return outputs.toArray(new String[0]);
    }
  };
  outputs = Arrays.asList("a", "b");
  try {
    template.execute(retryCallback, BatchRetryTemplate.createState(outputs));
    fail("Expected RecoverableException");
  }
  catch (RecoverableException e) {
    assertEquals("Recoverable", e.getMessage());
  }
  outputs = Arrays.asList("a", "c");
  template.execute(retryCallback, BatchRetryTemplate.createState(outputs));
}
origin: spring-projects/spring-batch

  template.execute(retryCallback, recoveryCallback, BatchRetryTemplate.createState(outputs));
  fail("Expected RecoverableException");
String[] result = template.execute(retryCallback, recoveryCallback, BatchRetryTemplate.createState(outputs));
assertEquals("[r:b, r:c]", Arrays.toString(result));
origin: org.springframework.batch/spring-batch-core

BatchRetryTemplate.createState(getInputKeys(inputs), rollbackClassifier));
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

BatchRetryTemplate.createState(getInputKeys(inputs), rollbackClassifier));
origin: apache/servicemix-bundles

BatchRetryTemplate.createState(getInputKeys(inputs), rollbackClassifier));
origin: org.springframework.batch/org.springframework.batch.core

batchRetryTemplate.execute(retryCallback, batchRecoveryCallback, BatchRetryTemplate.createState(
    getInputKeys(inputs), rollbackClassifier));
org.springframework.batch.core.step.itemBatchRetryTemplatecreateState

Popular methods of BatchRetryTemplate

  • <init>
  • execute
  • setRetryPolicy
  • setBackOffPolicy
  • setListeners
  • setRetryContextCache
  • canRetry

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Kernel (java.awt.image)
  • Permission (java.security)
    Legacy security code; do not use.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Runner (org.openjdk.jmh.runner)
  • CodeWhisperer 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