Implementation of
BackOff that increases the back off period for each retry attempt
using a randomization function that grows exponentially.
Example: The initial interval is .5 seconds and the maximum interval is 60 secs.
For 14 tries the sequence will be (values in seconds):
retry# retry_interval randomized_interval
1 0.5 [0.25, 0.75]
2 0.75 [0.375, 1.125]
3 1.125 [0.562, 1.687]
4 1.687 [0.8435, 2.53]
5 2.53 [1.265, 3.795]
6 3.795 [1.897, 5.692]
7 5.692 [2.846, 8.538]
8 8.538 [4.269, 12.807]
9 12.807 [6.403, 19.210]
10 28.832 [14.416, 43.248]
11 43.248 [21.624, 64.873]
12 60.0 [30.0, 90.0]
13 60.0 [30.0, 90.0]
14 60.0 [30.0, 90.0]
Implementation is not thread-safe.