Examples of ExhaustedRetryException


Examples of org.springframework.retry.ExhaustedRetryException

      @SuppressWarnings("unchecked")
      E rethrow = (E) context.getLastThrowable();
      throw rethrow;
    }
    else {
      throw new ExhaustedRetryException(message, context.getLastThrowable());
    }
  }
View Full Code Here

Examples of org.springframework.retry.ExhaustedRetryException

  @Override
  public T recover(Object[] args, Throwable cause) {
    Method method = findClosestMatch(cause.getClass());
    if (method == null) {
      throw new ExhaustedRetryException("Cannot locate recovery method", cause);
    }
    SimpleMetadata meta = methods.get(method);
    Object[] argsToUse = meta.getArgs(cause, args);
    @SuppressWarnings("unchecked")
    T result = (T) ReflectionUtils.invokeMethod(method, target, argsToUse);
View Full Code Here

Examples of org.springframework.retry.ExhaustedRetryException

           * If the last exception was not skippable we don't need to
           * do any scanning. We can just bomb out with a retry
           * exhausted.
           */
          if (!shouldSkip(itemWriteSkipPolicy, context.getLastThrowable(), -1)) {
            throw new ExhaustedRetryException(
                "Retry exhausted after last attempt in recovery path, but exception is not skippable.",
                context.getLastThrowable());
          }

          inputs.setBusy(true);
View Full Code Here

Examples of org.springframework.retry.ExhaustedRetryException

      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();
View Full Code Here

Examples of org.springframework.retry.ExhaustedRetryException

    Classifier<Throwable, Boolean> classifier = new BinaryExceptionClassifier(noRollbackExceptionClasses, false);

    // Try to avoid pathological cases where we cannot force a rollback
    // (should be pretty uncommon):
    if (!classifier.classify(new ForceRollbackForWriteSkipException("test", new RuntimeException()))
        || !classifier.classify(new ExhaustedRetryException("test"))) {

      final Classifier<Throwable, Boolean> binary = classifier;

      Collection<Class<? extends Throwable>> types = new HashSet<Class<? extends Throwable>>();
      types.add(ForceRollbackForWriteSkipException.class);
View Full Code Here

Examples of org.springframework.retry.ExhaustedRetryException

import org.springframework.retry.ExhaustedRetryException;

public class ExhaustedRetryExceptionTests extends AbstractExceptionTests {

  public Exception getException(String msg) throws Exception {
    return new ExhaustedRetryException(msg);
  }
View Full Code Here

Examples of org.springframework.retry.ExhaustedRetryException

  public Exception getException(String msg) throws Exception {
    return new ExhaustedRetryException(msg);
  }

  public Exception getException(String msg, Throwable t) throws Exception {
    return new ExhaustedRetryException(msg, t);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.