Interface Retry.RetryPolicy

    • Method Detail

      • nextDelayMillis

        Optional<Long> nextDelayMillis​(long firstCallMillis,
                                       long lastDelay,
                                       int call)
        Return next delay in milliseconds, or an empty optional to finish retries.
        firstCallMillis - milliseconds recorded before the first call using System.currentTimeMillis()
        lastDelay - last delay that was used (0 for the first failed call)
        call - call index (0 for the first failed call)
        how long to wait before trying again, or empty to notify this is the end of retries