Tabnine Logo
SimpleRetryExceptionHandler.getRepeatContext
Code IndexAdd Tabnine to your IDE (free)

How to use
getRepeatContext
method
in
org.springframework.batch.core.step.item.SimpleRetryExceptionHandler

Best Java code snippets using org.springframework.batch.core.step.item.SimpleRetryExceptionHandler.getRepeatContext (Showing top 5 results out of 315)

origin: spring-projects/spring-batch

/**
 * If retry is exhausted set up some state in the context that can be used
 * to signal that the exception should be handled.
 *
 * @see org.springframework.retry.RetryListener#close(org.springframework.retry.RetryContext,
 * org.springframework.retry.RetryCallback, java.lang.Throwable)
 */
@Override
public <T, E extends Throwable> void close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) {
  if (!retryPolicy.canRetry(context)) {
    if (logger.isDebugEnabled()) {
      logger.debug("Marking retry as exhausted: "+context);
    }
    getRepeatContext().setAttribute(EXHAUSTED, "true");
  }
}
origin: org.springframework.batch/org.springframework.batch.core

/**
 * If retry is exhausted set up some state in the context that can be used
 * to signal that the exception should be handled.
 * 
 * @see org.springframework.batch.retry.RetryListener#close(org.springframework.batch.retry.RetryContext,
 * org.springframework.batch.retry.RetryCallback, java.lang.Throwable)
 */
public <T> void close(RetryContext context, RetryCallback<T> callback, Throwable throwable) {
  if (!retryPolicy.canRetry(context)) {
    logger.debug("Marking retry as exhausted: "+context);
    getRepeatContext().setAttribute(EXHAUSTED, "true");
  }
}
origin: org.springframework.batch/spring-batch-core

/**
 * If retry is exhausted set up some state in the context that can be used
 * to signal that the exception should be handled.
 *
 * @see org.springframework.retry.RetryListener#close(org.springframework.retry.RetryContext,
 * org.springframework.retry.RetryCallback, java.lang.Throwable)
 */
@Override
public <T, E extends Throwable> void close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) {
  if (!retryPolicy.canRetry(context)) {
    if (logger.isDebugEnabled()) {
      logger.debug("Marking retry as exhausted: "+context);
    }
    getRepeatContext().setAttribute(EXHAUSTED, "true");
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * If retry is exhausted set up some state in the context that can be used
 * to signal that the exception should be handled.
 *
 * @see org.springframework.retry.RetryListener#close(org.springframework.retry.RetryContext,
 * org.springframework.retry.RetryCallback, java.lang.Throwable)
 */
@Override
public <T, E extends Throwable> void close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) {
  if (!retryPolicy.canRetry(context)) {
    logger.debug("Marking retry as exhausted: "+context);
    getRepeatContext().setAttribute(EXHAUSTED, "true");
  }
}
origin: apache/servicemix-bundles

/**
 * If retry is exhausted set up some state in the context that can be used
 * to signal that the exception should be handled.
 *
 * @see org.springframework.retry.RetryListener#close(org.springframework.retry.RetryContext,
 * org.springframework.retry.RetryCallback, java.lang.Throwable)
 */
@Override
public <T, E extends Throwable> void close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) {
  if (!retryPolicy.canRetry(context)) {
    if (logger.isDebugEnabled()) {
      logger.debug("Marking retry as exhausted: "+context);
    }
    getRepeatContext().setAttribute(EXHAUSTED, "true");
  }
}
org.springframework.batch.core.step.itemSimpleRetryExceptionHandlergetRepeatContext

Javadoc

Get the parent context (the retry is in an inner "chunk" loop and we want the exception to be handled at the outer "step" level).

Popular methods of SimpleRetryExceptionHandler

  • <init>
    Create an exception handler from its mandatory properties.
  • close
    If retry is exhausted set up some state in the context that can be used to signal that the exception
  • handleException
    Check if the exception is going to be retried, and veto the handling if it is. If retry is exhausted

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JList (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
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