class RetryAttempt {

    long getRetryInterval() {

        long retryInterval;

        String retryAfter = getRetryAfter();
        // from header
        if (retryAfter != null) {

            retryInterval = TimeUnit.MILLISECONDS.convert(Integer.parseInt(retryAfter), TimeUnit.SECONDS);
            // from default conf
        } else {

            retryInterval = writeOptions.getRetryInterval()
                    * (long) (Math.pow(writeOptions.getExponentialBase(), count - 1));

            retryInterval = Math.min(retryInterval, writeOptions.getMaxRetryDelay());

            String msg = "The InfluxDB does not specify \"Retry-After\". Use the default retryInterval: {0}";
            LOG.log(Level.FINEST, msg, retryInterval);
        }

        retryInterval = retryInterval + jitterDelay(writeOptions.getJitterInterval());

        return retryInterval;
    }

      RetryAttempt(final Throwable throwable, final int count, final WriteOptions writeOptions);

}