class RetryUtil {

    public static long getWaitTimeMillis(int retryTimes) {
        if (retryTimes < MAXIMUM_TRY_NUMBER) {
            // Not need to wait.
            return 0;
        } else {
            int power = (retryTimes / MAXIMUM_TRY_NUMBER) - 1;
            return TEN_MINUTES * (long) Math.pow(MAXIMUM_TRY_NUMBER, power);
        }
    }

    private  RetryUtil();

}