Package com.dropbox.core
Class RetryException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.dropbox.core.DbxException
com.dropbox.core.RetryException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RateLimitException
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:
-
Constructor Summary
ConstructorsConstructorDescriptionRetryException(String requestId, String message) Creates an instance of this exception with no retry backoff.RetryException(String requestId, String message, long backoff, TimeUnit unit) Creates an instance of this exception with the given retry backoff. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the number of milliseconds the client should backoff before retrying the request.Methods inherited from class com.dropbox.core.DbxException
getRequestIdMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RetryException
Creates an instance of this exception with no retry backoff.- Parameters:
requestId- ID assigned to request by Dropbox serversmessage- Error message
-
RetryException
Creates an instance of this exception with the given retry backoff.- Parameters:
requestId- ID assigned to request by Dropbox serversmessage- Error messagebackoff- amount of time to backoff before retrying the requestunit- unit of time forbackoff
-
-
Method Details
-
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
0if the request can be retried immediately.
-