Class ReconnectionStrategy


  • public class ReconnectionStrategy
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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 Detail

      • ReconnectionStrategy

        public ReconnectionStrategy()
    • Method Detail

      • 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