AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
Public 成员函数 | 静态 Public 属性 | Protected 成员函数 | Private 属性 | 所有成员列表
com.ab.network.toolbox.DefaultRetryPolicy类 参考
类 com.ab.network.toolbox.DefaultRetryPolicy 继承关系图:
com.ab.network.toolbox.RetryPolicy

Public 成员函数

 DefaultRetryPolicy ()
 
 DefaultRetryPolicy (int initialTimeoutMs, int maxNumRetries, float backoffMultiplier)
 
int getCurrentTimeout ()
 
int getCurrentRetryCount ()
 
void retry (VolleyError error) throws VolleyError
 

静态 Public 属性

static final int DEFAULT_TIMEOUT_MS = 2500
 
static final int DEFAULT_MAX_RETRIES = 1
 
static final float DEFAULT_BACKOFF_MULT = 1f
 

Protected 成员函数

boolean hasAttemptRemaining ()
 

Private 属性

int mCurrentTimeoutMs
 
int mCurrentRetryCount
 
final int mMaxNumRetries
 
final float mBackoffMultiplier
 

详细描述

Default retry policy for requests.

构造及析构函数说明

com.ab.network.toolbox.DefaultRetryPolicy.DefaultRetryPolicy ( )
inline

Constructs a new retry policy using the default timeouts.

com.ab.network.toolbox.DefaultRetryPolicy.DefaultRetryPolicy ( int  initialTimeoutMs,
int  maxNumRetries,
float  backoffMultiplier 
)
inline

Constructs a new retry policy.

参数
initialTimeoutMsThe initial timeout for the policy.
maxNumRetriesThe maximum number of retries.
backoffMultiplierBackoff multiplier for the policy.

成员函数说明

int com.ab.network.toolbox.DefaultRetryPolicy.getCurrentRetryCount ( )
inline

Returns the current retry count.

实现了 com.ab.network.toolbox.RetryPolicy.

int com.ab.network.toolbox.DefaultRetryPolicy.getCurrentTimeout ( )
inline

Returns the current timeout.

实现了 com.ab.network.toolbox.RetryPolicy.

boolean com.ab.network.toolbox.DefaultRetryPolicy.hasAttemptRemaining ( )
inlineprotected

Returns true if this policy has attempts remaining, false otherwise.

void com.ab.network.toolbox.DefaultRetryPolicy.retry ( VolleyError  error) throws VolleyError
inline

Prepares for the next retry by applying a backoff to the timeout.

参数
errorThe error code of the last attempt.

实现了 com.ab.network.toolbox.RetryPolicy.

类成员变量说明

final float com.ab.network.toolbox.DefaultRetryPolicy.DEFAULT_BACKOFF_MULT = 1f
static

The default backoff multiplier

final int com.ab.network.toolbox.DefaultRetryPolicy.DEFAULT_MAX_RETRIES = 1
static

The default number of retries

final int com.ab.network.toolbox.DefaultRetryPolicy.DEFAULT_TIMEOUT_MS = 2500
static

The default socket timeout in milliseconds

final float com.ab.network.toolbox.DefaultRetryPolicy.mBackoffMultiplier
private

The backoff multiplier for for the policy.

int com.ab.network.toolbox.DefaultRetryPolicy.mCurrentRetryCount
private

The current retry count.

int com.ab.network.toolbox.DefaultRetryPolicy.mCurrentTimeoutMs
private

The current timeout in milliseconds.

final int com.ab.network.toolbox.DefaultRetryPolicy.mMaxNumRetries
private

The maximum number of attempts.


该类的文档由以下文件生成: