Examples of AlwaysRetryPolicy


Examples of com.cloudera.util.AlwaysRetryPolicy

    List<String> names = Arrays.asList("first", "second", "third", "fourth",
        "fifth");
    FailoverChainSink snk = new FailoverChainSink(new ReportTestingContext(),
        "{ lazyOpen => { intervalFlakeyAppend(2) => accumulator(\"%s\")}}",
        names, new AlwaysRetryPolicy());

    // failover sink replaces each names

    LOG.info(snk.getMetrics().toText());
View Full Code Here

Examples of com.cloudera.util.AlwaysRetryPolicy

    List<String> names = Arrays.asList("first", "second", "third", "fourth",
        "fifth");
    FailoverChainSink snk = new FailoverChainSink(new ReportTestingContext(),
        "{ lazyOpen => { intervalFlakeyAppend(2) => accumulator(\"%s\")}}",
        names, new AlwaysRetryPolicy());

    // failover sink replaces each names

    LOG.info(snk.getReport().toText());
View Full Code Here

Examples of com.flaptor.util.remote.AlwaysRetryPolicy

     * Constructor.
     * @param basePort the base port where the remote instance of Hounder is running.
     * @param host
     */
    public RmiIndexerStub(final int basePort, final String host) {
        super(PortUtil.getPort(basePort,"indexer.rmi"), host, new AlwaysRetryPolicy());
    }
View Full Code Here

Examples of com.flaptor.util.remote.AlwaysRetryPolicy


        //now check through multiSearcher
        Config.getConfig("multiSearcher.properties").set("multiSearcher.hosts", hosts);

        final ISearcher multiSearcher = new MultiSearcher(new AlwaysRetryPolicy());
        Thread.sleep(5000);

        Execution<Void> execution = new Execution<Void>();
        for (int times = 0; times < 50; times++) {
            execution.addTask(new Callable<Void>() {
View Full Code Here

Examples of org.springframework.retry.policy.AlwaysRetryPolicy

   * Test method for
   * {@link org.springframework.batch.core.step.item.SimpleRetryExceptionHandler#handleException(org.springframework.batch.repeat.RepeatContext, java.lang.Throwable)} .
   */
  public void testNoRethrowWhenRetryNotExhausted() throws Throwable {

    RetryPolicy retryPolicy = new AlwaysRetryPolicy();
    RuntimeException ex = new RuntimeException("foo");

    SimpleRetryExceptionHandler handler = getHandlerAfterRetry(retryPolicy, ex, Collections
        .<Class<? extends Throwable>> singleton(Error.class));

View Full Code Here

Examples of org.springframework.retry.policy.AlwaysRetryPolicy

   * Test method for
   * {@link org.springframework.batch.core.step.item.SimpleRetryExceptionHandler#handleException(org.springframework.batch.repeat.RepeatContext, java.lang.Throwable)} .
   */
  public void testRethrowWhenFatal() throws Throwable {

    RetryPolicy retryPolicy = new AlwaysRetryPolicy();
    RuntimeException ex = new RuntimeException("foo");

    SimpleRetryExceptionHandler handler = getHandlerAfterRetry(retryPolicy, ex, Collections
        .<Class<? extends Throwable>> singleton(RuntimeException.class));

View Full Code Here

Examples of org.springframework.retry.policy.AlwaysRetryPolicy

    assertEquals(1, count);
  }

  @Test
  public void testDefaultInterceptorAlwaysRetry() throws Exception {
    retryTemplate.setRetryPolicy(new AlwaysRetryPolicy());
    interceptor.setRetryOperations(retryTemplate);
    ((Advised) service).addAdvice(interceptor);
    try {
      service.service("foo");
      fail("Expected Exception.");
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.