Examples of ExponentialBackoff


Examples of org.springframework.util.backoff.ExponentialBackOff

    assertEquals(50L, execution.nextBackOff());
  }

  @Test
  public void toStringContent() {
    ExponentialBackOff backOff = new ExponentialBackOff(2000L, 2.0);
    BackOffExecution execution = backOff.start();
    assertEquals("ExponentialBackOff{currentInterval=n/a, multiplier=2.0}", execution.toString());
    execution.nextBackOff();
    assertEquals("ExponentialBackOff{currentInterval=2000ms, multiplier=2.0}", execution.toString());
    execution.nextBackOff();
    assertEquals("ExponentialBackOff{currentInterval=4000ms, multiplier=2.0}", execution.toString());
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.