Class RecoveryDelayHandler.DefaultRecoveryDelayHandler

    • Constructor Detail

      • DefaultRecoveryDelayHandler

        public DefaultRecoveryDelayHandler​(long networkRecoveryInterval)
        Default Constructor
        Parameters:
        networkRecoveryInterval - recovery delay time in millis
    • Method Detail

      • getDelay

        public long getDelay​(int recoveryAttempts)
        Description copied from interface: RecoveryDelayHandler
        Get the time to sleep (in milliseconds) before attempting to reconnect and recover again. This method will be called with recoveryAttempts=0 before the first recovery attempt and then again after each failed recovery.
        Specified by:
        getDelay in interface RecoveryDelayHandler
        Parameters:
        recoveryAttempts - The number of recovery attempts so far.
        Returns:
        the delay in milliseconds