接口 RetryPolicy

所有已知实现类:
DefaultRetryPolicy

public interface RetryPolicy
Retry policy for a request.
  • 方法概要

    修饰符和类型
    方法
    说明
    int
    Returns the current retry count (used for logging).
    int
    Returns the current timeout (used for logging).
    void
    Prepares for the next retry by applying a backoff to the timeout.
  • 方法详细资料

    • getCurrentTimeout

      int getCurrentTimeout()
      Returns the current timeout (used for logging).
    • getCurrentRetryCount

      int getCurrentRetryCount()
      Returns the current retry count (used for logging).
    • retry

      void retry(VolleyError error) throws VolleyError
      Prepares for the next retry by applying a backoff to the timeout.
      参数:
      error - The error code of the last attempt.
      抛出:
      VolleyError - In the event that the retry could not be performed (for example if we ran out of attempts), the passed in error is thrown.