Examples of RetryException


Examples of org.springframework.retry.RetryException

        @Override
        public Object recover(RetryContext context) throws Exception {

          Throwable e = context.getLastThrowable();
          if (outputs.size() > 1 && !rollbackClassifier.classify(e)) {
            throw new RetryException("Invalid retry state during write caused by "
                + "exception that does not classify for rollback: ", e);
          }

          Chunk<I>.ChunkIterator inputIterator = inputs.iterator();
          for (Chunk<O>.ChunkIterator outputIterator = outputs.iterator(); outputIterator.hasNext();) {

            inputIterator.next();
            outputIterator.next();

            checkSkipPolicy(inputIterator, outputIterator, e, contribution, true);
            if (!rollbackClassifier.classify(e)) {
              throw new RetryException(
                  "Invalid retry state during recovery caused by exception that does not classify for rollback: ",
                  e);
            }

          }
View Full Code Here

Examples of org.springframework.retry.RetryException

      logger.debug("Skipping after failed write", e);
    }
    else {
      if (recovery) {
        // Only if already recovering should we check skip policy
        throw new RetryException("Non-skippable exception in recoverer", e);
      }
      else {
        if (e instanceof Exception) {
          throw (Exception) e;
        }
        else if (e instanceof Error) {
          throw (Error) e;
        }
        else {
          throw new RetryException("Non-skippable throwable in recoverer", e);
        }
      }
    }
  }
View Full Code Here

Examples of org.springframework.retry.RetryException

import org.springframework.retry.RetryException;

public class RetryExceptionTests extends AbstractExceptionTests {

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

Examples of org.springframework.retry.RetryException

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

  public Exception getException(String msg, Throwable t) throws Exception {
    return new RetryException(msg, t);
  }
View Full Code Here

Examples of org.voltcore.utils.CoreUtils.RetryException

                if (count > 5) {
                    sem.release();
                    return null;
                }
                System.out.println(count);
                throw new RetryException();
            }
        };
        CoreUtils.retryHelper(stpe, es, c, 0, 1, TimeUnit.MILLISECONDS, 10, TimeUnit.MILLISECONDS);
        sem.acquire();
        stpe.shutdown();
View Full Code Here

Examples of org.voltcore.utils.CoreUtils.RetryException

        ExecutorService es = Executors.newFixedThreadPool(1);
        final AtomicInteger count = new AtomicInteger();
        Callable<Object> c = new Callable<Object>() {
            public Object call() throws Exception {
                count.incrementAndGet();
                throw new RetryException();
            }
        };

        // attempt 5 times
        try {
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.