Tabnine Logo
RetryTemplate.handleRetryExhausted
Code IndexAdd Tabnine to your IDE (free)

How to use
handleRetryExhausted
method
in
org.springframework.retry.support.RetryTemplate

Best Java code snippets using org.springframework.retry.support.RetryTemplate.handleRetryExhausted (Showing top 6 results out of 315)

origin: spring-projects/spring-batch

@Override
protected <T> T handleRetryExhausted(RecoveryCallback<T> recoveryCallback, RetryContext context,
    RetryState state) throws Throwable {
  BatchRetryState batchState = (BatchRetryState) state;
  BatchRetryContext batchContext = (BatchRetryContext) context;
  // Accumulate exceptions to be thrown so all the keys get a crack
  Throwable rethrowable = null;
  ExhaustedRetryException exhausted = null;
  Iterator<RetryContext> contextIterator = batchContext.contexts.iterator();
  for (RetryState retryState : batchState.keys) {
    RetryContext nextContext = contextIterator.next();
    try {
      super.handleRetryExhausted(null, nextContext, retryState);
    }
    catch (ExhaustedRetryException e) {
      exhausted = e;
    }
    catch (Throwable e) {
      rethrowable = e;
    }
  }
  if (recoveryCallback != null) {
    return recoveryCallback.recover(context);
  }
  if (exhausted != null) {
    throw exhausted;
  }
  throw rethrowable;
}
origin: spring-projects/spring-retry

return handleRetryExhausted(recoveryCallback, context, state);
origin: apache/servicemix-bundles

@Override
protected <T> T handleRetryExhausted(RecoveryCallback<T> recoveryCallback, RetryContext context,
    RetryState state) throws Throwable {
  BatchRetryState batchState = (BatchRetryState) state;
  BatchRetryContext batchContext = (BatchRetryContext) context;
  // Accumulate exceptions to be thrown so all the keys get a crack
  Throwable rethrowable = null;
  ExhaustedRetryException exhausted = null;
  Iterator<RetryContext> contextIterator = batchContext.contexts.iterator();
  for (RetryState retryState : batchState.keys) {
    RetryContext nextContext = contextIterator.next();
    try {
      super.handleRetryExhausted(null, nextContext, retryState);
    }
    catch (ExhaustedRetryException e) {
      exhausted = e;
    }
    catch (Throwable e) {
      rethrowable = e;
    }
  }
  if (recoveryCallback != null) {
    return recoveryCallback.recover(context);
  }
  if (exhausted != null) {
    throw exhausted;
  }
  throw rethrowable;
}
origin: org.springframework.batch/spring-batch-core

@Override
protected <T> T handleRetryExhausted(RecoveryCallback<T> recoveryCallback, RetryContext context,
    RetryState state) throws Throwable {
  BatchRetryState batchState = (BatchRetryState) state;
  BatchRetryContext batchContext = (BatchRetryContext) context;
  // Accumulate exceptions to be thrown so all the keys get a crack
  Throwable rethrowable = null;
  ExhaustedRetryException exhausted = null;
  Iterator<RetryContext> contextIterator = batchContext.contexts.iterator();
  for (RetryState retryState : batchState.keys) {
    RetryContext nextContext = contextIterator.next();
    try {
      super.handleRetryExhausted(null, nextContext, retryState);
    }
    catch (ExhaustedRetryException e) {
      exhausted = e;
    }
    catch (Throwable e) {
      rethrowable = e;
    }
  }
  if (recoveryCallback != null) {
    return recoveryCallback.recover(context);
  }
  if (exhausted != null) {
    throw exhausted;
  }
  throw rethrowable;
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

@Override
protected <T> T handleRetryExhausted(RecoveryCallback<T> recoveryCallback, RetryContext context,
    RetryState state) throws Throwable {
  BatchRetryState batchState = (BatchRetryState) state;
  BatchRetryContext batchContext = (BatchRetryContext) context;
  // Accumulate exceptions to be thrown so all the keys get a crack
  Throwable rethrowable = null;
  ExhaustedRetryException exhausted = null;
  Iterator<RetryContext> contextIterator = batchContext.contexts.iterator();
  for (RetryState retryState : batchState.keys) {
    RetryContext nextContext = contextIterator.next();
    try {
      super.handleRetryExhausted(null, nextContext, retryState);
    }
    catch (ExhaustedRetryException e) {
      exhausted = e;
    }
    catch (Throwable e) {
      rethrowable = e;
    }
  }
  if (recoveryCallback != null) {
    return recoveryCallback.recover(context);
  }
  if (exhausted != null) {
    throw exhausted;
  }
  throw rethrowable;
}
origin: org.springframework.retry/spring-retry

return handleRetryExhausted(recoveryCallback, context, state);
org.springframework.retry.supportRetryTemplatehandleRetryExhausted

Javadoc

Actions to take after final attempt has failed. If there is state clean up the cache. If there is a recovery callback, execute that and return its result. Otherwise throw an exception.

Popular methods of RetryTemplate

  • <init>
  • setRetryPolicy
    Setter for RetryPolicy.
  • setBackOffPolicy
    Setter for BackOffPolicy.
  • execute
    Execute the callback once if the policy dictates that we can, re-throwing any exception encountered
  • registerListener
    Register an additional listener.
  • setListeners
    Setter for listeners. The listeners are executed before and after a retry block (i.e. before and aft
  • setRetryContextCache
    Public setter for the RetryContextCache.
  • canRetry
    Decide whether to proceed with the ongoing retry attempt. This method is called before the RetryCall
  • close
    Clean up the cache if necessary and close the context provided (if the flag indicates that processin
  • open
    Delegate to the RetryPolicy having checked in the cache for an existing value if the state is not nu
  • registerThrowable
  • setThrowLastExceptionOnExhausted
  • registerThrowable,
  • setThrowLastExceptionOnExhausted,
  • doCloseInterceptors,
  • doExecute,
  • doOnErrorInterceptors,
  • doOpenInterceptors,
  • doOpenInternal,
  • registerContext,
  • rethrow

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • startActivity (Activity)
  • getContentResolver (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 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