Package io.ably.lib.util
Class ReconnectionStrategy
- java.lang.Object
-
- io.ably.lib.util.ReconnectionStrategy
-
public class ReconnectionStrategy extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ReconnectionStrategy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetRetryTime(long initialTimeout, int retryAttempt)Spec: RTB1
-
-
-
Method Detail
-
getRetryTime
public static int getRetryTime(long initialTimeout, int retryAttempt)Spec: RTB1- Parameters:
initialTimeout- The initial timeout valueretryAttempt- integer indicating retryAttempt- Returns:
- RetryTimeout value for given timeout and retryAttempt. If x is the value returned then, Upper bound = min((retryAttempt + 2) / 3, 2) * initialTimeout, Lower bound = 0.8 * Upper bound, Lower bound < x < Upper bound
-
-