public class ExponentialTimeBackoff extends Object
next method that implements wait (blocking or non-blocking - returns true/false whether code
can proceed).
Class wait time grow exponentially up to maxBackoffMillis time: 1sec, 2 sec, 4 sec, 8
sec,...,maxBackoffMillis.
| Modifier and Type | Class and Description |
|---|---|
static class |
ExponentialTimeBackoff.Builder |
| Modifier and Type | Method and Description |
|---|---|
static ExponentialTimeBackoff.Builder |
builder() |
boolean |
next()
Exponential backoff wait.
|
public static ExponentialTimeBackoff.Builder builder()
public boolean next()
Thread.sleep(long) is called and true is always returned.
If wait is non-blocking, the method returns true if logic can proceed (enough time has elapsed)Copyright © 2022. All rights reserved.