add maxRestarts to RestartWithBackoff #24129

This commit is contained in:
Patrik Nordwall 2018-01-16 18:28:10 +01:00 committed by Johan Andrén
parent 32987c8704
commit e4dd3c24fc
6 changed files with 393 additions and 22 deletions

View file

@ -56,6 +56,7 @@ public class RestartDocTest {
Duration.apply(3, TimeUnit.SECONDS), // min backoff
Duration.apply(30, TimeUnit.SECONDS), // max backoff
0.2, // adds 20% "noise" to vary the intervals slightly
20, // limits the amount of restarts to 20
() ->
// Create a source from a future of a source
Source.fromSourceCompletionStage(