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
Modifier and Type Method Description static intgetRetryTime(long initialTimeout, int retryAttempt)Spec: RTB1
-
Constructor Details
-
ReconnectionStrategy
public ReconnectionStrategy()
-
-
Method Details
-
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
-