Subversion Repositories SmartDukaan

Rev

Rev 18084 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18084 Rev 21166
Line 22... Line 22...
22
public interface RetryPolicy {
22
public interface RetryPolicy {
23
 
23
 
24
    /**
24
    /**
25
     * Returns the current timeout (used for logging).
25
     * Returns the current timeout (used for logging).
26
     */
26
     */
27
    public int getCurrentTimeout();
27
    int getCurrentTimeout();
28
 
28
 
29
    /**
29
    /**
30
     * Returns the current retry count (used for logging).
30
     * Returns the current retry count (used for logging).
31
     */
31
     */
32
    public int getCurrentRetryCount();
32
    int getCurrentRetryCount();
33
 
33
 
34
    /**
34
    /**
35
     * Prepares for the next retry by applying a backoff to the timeout.
35
     * Prepares for the next retry by applying a backoff to the timeout.
36
     * @param error The error code of the last attempt.
36
     * @param error The error code of the last attempt.
37
     * @throws VolleyError In the event that the retry could not be performed (for example if we
37
     * @throws VolleyError In the event that the retry could not be performed (for example if we
38
     * ran out of attempts), the passed in error is thrown.
38
     * ran out of attempts), the passed in error is thrown.
39
     */
39
     */
40
    public void retry(VolleyError error) throws VolleyError;
40
    void retry(VolleyError error) throws VolleyError;
41
}
41
}