Class RetryException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    RateLimitException

    public class RetryException
    extends DbxException
    A transient exception has occurred and the request should be retried. Clients should only retry requests after waiting the requested backoff duration (see getBackoffMillis()).
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      RetryException​(java.lang.String requestId, java.lang.String message)
      Creates an instance of this exception with no retry backoff.
      RetryException​(java.lang.String requestId, java.lang.String message, long backoff, java.util.concurrent.TimeUnit unit)
      Creates an instance of this exception with the given retry backoff.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getBackoffMillis()
      Returns the number of milliseconds the client should backoff before retrying the request.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RetryException

        public RetryException​(java.lang.String requestId,
                              java.lang.String message)
        Creates an instance of this exception with no retry backoff.
        Parameters:
        requestId - ID assigned to request by Dropbox servers
        message - Error message
      • RetryException

        public RetryException​(java.lang.String requestId,
                              java.lang.String message,
                              long backoff,
                              java.util.concurrent.TimeUnit unit)
        Creates an instance of this exception with the given retry backoff.
        Parameters:
        requestId - ID assigned to request by Dropbox servers
        message - Error message
        backoff - amount of time to backoff before retrying the request
        unit - unit of time for backoff
    • Method Detail

      • getBackoffMillis

        public long getBackoffMillis()
        Returns the number of milliseconds the client should backoff before retrying the request.
        Returns:
        backoff time, in milliseconds, before retrying the request, or 0 if the request can be retried immediately.