RetryPreparationDecision
public
class
RetryPreparationDecision
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.retry.RetryPreparationDecision |
一个类,用于描述是否重试准备以及是否失败运行模块的决策。总体而言,有 3 种情况: - NO_NEED_RETRY:无需重试准备,但需要停止模块运行。 - RETRIED_SUCCESS:无需重试准备,也无需停止模块运行。 - RETRIED_FAILED:需要重试准备,但无需停止模块运行。
摘要
公共构造函数 | |
|---|---|
RetryPreparationDecision(boolean shouldRetry, boolean shouldFailRun)
|
|
公共方法 | |
|---|---|
Throwable
|
getPreviousException()
重试后返回上一个异常。 |
void
|
setPreviousException(Throwable exception)
重试后设置上一个异常。 |
boolean
|
shouldFailRun()
返回是否停止模块运行。 |
boolean
|
shouldRetry()
返回是否重试模块准备。 |
公共构造函数
RetryPreparationDecision
public RetryPreparationDecision (boolean shouldRetry,
boolean shouldFailRun)| 参数 | |
|---|---|
shouldRetry |
boolean |
shouldFailRun |
boolean |
公共方法
getPreviousException
public Throwable getPreviousException ()
重试后返回之前的异常。
| 返回 | |
|---|---|
Throwable |
|
setPreviousException
public void setPreviousException (Throwable exception)
重试后设置上一个异常。
| 参数 | |
|---|---|
exception |
Throwable |
shouldFailRun
public boolean shouldFailRun ()
返回是否停止模块运行。
| 返回 | |
|---|---|
boolean |
|
shouldRetry
public boolean shouldRetry ()
返回是否重试模块准备。
| 返回 | |
|---|---|
boolean |
|