private long getWaitUntilMillis ( int retryAfterSeconds ) { double multiplier = waitTimeNoiseFactor . get ( ) . nextDouble ( ) ; multiplier = multiplier * ( MAX_WAIT_TIME_MULTIPLIER - MIN_WAIT_TIME_MULTIPLIER ) + MIN_WAIT_TIME_MULTIPLIER ; double result = SECONDS . toMillis ( retryAfterSeconds ) * multiplier ; return ( long ) result ; }
Decides the actual wait time in milliseconds by applying a random multiplier to retryAfterSeconds .