What does backoffMultiplier mean in DefaultRetryPolicy?

I created a new retry policy new DefaultRetryPolicy (5000, 2, 2);

+6
source share
1 answer

RetryPolicy handles these three parameters

Timeout — Specifies the socket timeout in milliseconds for each retry attempt.

Retries - The number of retries.

BackOff Multiplier - a multiplier that is used to determine the exponential time set in socket for each attempt to repeat.

In the example above

Timeout - 5000 seconds, number of attempts - 2, shutdown multiplier - 2

Attempt 1 :

time = time + (time * Multiplier Back Off);

time = 5000 + 10000 = 15000

- = ;

Socket 15 .

2:

= + ( * Back Off);

= 15000 + 30000 = 45000

- = ;

Socket 45 .

, 2, - Socket, Volley TimeoutError UI.

+5

Source: https://habr.com/ru/post/1016308/


All Articles