Spring Framework ExponentialBackOff - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ExponentialBackOff class.

This code example shows how to use the following methods:setMultiplier
		assertEquals(BackOffExecution.STOP, execution2.nextBackOff());
	} 
 
	@Test
	public void invalidInterval() { 
		ExponentialBackOff backOff = new ExponentialBackOff();
 
		thrown.expect(IllegalArgumentException.class);
		backOff.setMultiplier(0.9);
	} 
 
	@Test
	public void maxIntervalReachedImmediately() { 
		ExponentialBackOff backOff = new ExponentialBackOff(1000L, 2.0);
		backOff.setMaxInterval(50L);
 
		BackOffExecution execution = backOff.start();
		assertEquals(50L, execution.nextBackOff());
		assertEquals(50L, execution.nextBackOff());
	} 
6
CodeRank
See Code Examples for Spring Framework ExponentialBackOff Methods: