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 int getRetryTime​(long initialTimeout, int retryAttempt)
    Spec: RTB1

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getRetryTime

      public static int getRetryTime​(long initialTimeout, int retryAttempt)
      Spec: RTB1
      Parameters:
      initialTimeout - The initial timeout value
      retryAttempt - 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