Examples of nextBackOff()


Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

  @Test
  public void toStringContent() {
    FixedBackOff backOff = new FixedBackOff(200L, 10);
    BackOffExecution execution = backOff.start();
    assertEquals("FixedBackOff{interval=200, currentAttempts=0, maxAttempts=10}", execution.toString());
    execution.nextBackOff();
    assertEquals("FixedBackOff{interval=200, currentAttempts=1, maxAttempts=10}", execution.toString());
    execution.nextBackOff();
    assertEquals("FixedBackOff{interval=200, currentAttempts=2, maxAttempts=10}", execution.toString());
  }
View Full Code Here

Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

    FixedBackOff backOff = new FixedBackOff(200L, 10);
    BackOffExecution execution = backOff.start();
    assertEquals("FixedBackOff{interval=200, currentAttempts=0, maxAttempts=10}", execution.toString());
    execution.nextBackOff();
    assertEquals("FixedBackOff{interval=200, currentAttempts=1, maxAttempts=10}", execution.toString());
    execution.nextBackOff();
    assertEquals("FixedBackOff{interval=200, currentAttempts=2, maxAttempts=10}", execution.toString());
  }

}
View Full Code Here

Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

  @Test
  public void defaultInstance() {
    ExponentialBackOff backOff = new ExponentialBackOff();
    BackOffExecution execution = backOff.start();
    assertEquals(2000l, execution.nextBackOff());
    assertEquals(3000l, execution.nextBackOff());
    assertEquals(4500l, execution.nextBackOff());
  }

  @Test
View Full Code Here

Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

  @Test
  public void defaultInstance() {
    ExponentialBackOff backOff = new ExponentialBackOff();
    BackOffExecution execution = backOff.start();
    assertEquals(2000l, execution.nextBackOff());
    assertEquals(3000l, execution.nextBackOff());
    assertEquals(4500l, execution.nextBackOff());
  }

  @Test
  public void simpleIncrease() {
View Full Code Here

Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

  public void defaultInstance() {
    ExponentialBackOff backOff = new ExponentialBackOff();
    BackOffExecution execution = backOff.start();
    assertEquals(2000l, execution.nextBackOff());
    assertEquals(3000l, execution.nextBackOff());
    assertEquals(4500l, execution.nextBackOff());
  }

  @Test
  public void simpleIncrease() {
    ExponentialBackOff backOff = new ExponentialBackOff(100L, 2.0);
View Full Code Here

Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

  @Test
  public void simpleIncrease() {
    ExponentialBackOff backOff = new ExponentialBackOff(100L, 2.0);
    BackOffExecution execution = backOff.start();
    assertEquals(100l, execution.nextBackOff());
    assertEquals(200l, execution.nextBackOff());
    assertEquals(400l, execution.nextBackOff());
    assertEquals(800l, execution.nextBackOff());
  }
View Full Code Here

Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

  @Test
  public void simpleIncrease() {
    ExponentialBackOff backOff = new ExponentialBackOff(100L, 2.0);
    BackOffExecution execution = backOff.start();
    assertEquals(100l, execution.nextBackOff());
    assertEquals(200l, execution.nextBackOff());
    assertEquals(400l, execution.nextBackOff());
    assertEquals(800l, execution.nextBackOff());
  }

  @Test
View Full Code Here

Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

  public void simpleIncrease() {
    ExponentialBackOff backOff = new ExponentialBackOff(100L, 2.0);
    BackOffExecution execution = backOff.start();
    assertEquals(100l, execution.nextBackOff());
    assertEquals(200l, execution.nextBackOff());
    assertEquals(400l, execution.nextBackOff());
    assertEquals(800l, execution.nextBackOff());
  }

  @Test
  public void fixedIncrease() {
View Full Code Here

Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

    ExponentialBackOff backOff = new ExponentialBackOff(100L, 2.0);
    BackOffExecution execution = backOff.start();
    assertEquals(100l, execution.nextBackOff());
    assertEquals(200l, execution.nextBackOff());
    assertEquals(400l, execution.nextBackOff());
    assertEquals(800l, execution.nextBackOff());
  }

  @Test
  public void fixedIncrease() {
    ExponentialBackOff backOff = new ExponentialBackOff(100L, 1.0);
View Full Code Here

Examples of org.springframework.util.backoff.BackOffExecution.nextBackOff()

  public void fixedIncrease() {
    ExponentialBackOff backOff = new ExponentialBackOff(100L, 1.0);
    backOff.setMaxElapsedTime(300l);

    BackOffExecution execution = backOff.start();
    assertEquals(100l, execution.nextBackOff());
    assertEquals(100l, execution.nextBackOff());
    assertEquals(100l, execution.nextBackOff());
    assertEquals(BackOffExecution.STOP, execution.nextBackOff());
  }
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.