RetryPreparationDecision
public
class
RetryPreparationDecision
extends Object
java.lang.Object | |
↳ | com.android.tradefed.retry.RetryPreparationDecision |
A Class to describe the decisions about whether or not to retry preparation and to fail the module run. Overall, there would be 3 situations: - NO_NEED_RETRY: No need to retry preparation but need to stop the module run. - RETRIED_SUCCESS: No need to retry preparation and no need to stop the module run. - RETRIED_FAILED: Need to retry preparation but no need to stop the module run.
Summary
Public constructors | |
---|---|
RetryPreparationDecision(boolean shouldRetry, boolean shouldFailRun)
|
Public methods | |
---|---|
Throwable
|
getPreviousException()
Returns the previous exception after retrying. |
void
|
setPreviousException(Throwable exception)
Set the previous exception after retrying. |
boolean
|
shouldFailRun()
Returns whether or not to stop the module run. |
boolean
|
shouldRetry()
Returns whether or not to retry module preparation. |
Public constructors
RetryPreparationDecision
public RetryPreparationDecision (boolean shouldRetry, boolean shouldFailRun)
Parameters | |
---|---|
shouldRetry |
boolean |
shouldFailRun |
boolean |
Public methods
getPreviousException
public Throwable getPreviousException ()
Returns the previous exception after retrying.
Returns | |
---|---|
Throwable |
setPreviousException
public void setPreviousException (Throwable exception)
Set the previous exception after retrying.
Parameters | |
---|---|
exception |
Throwable |
shouldFailRun
public boolean shouldFailRun ()
Returns whether or not to stop the module run.
Returns | |
---|---|
boolean |
shouldRetry
public boolean shouldRetry ()
Returns whether or not to retry module preparation.
Returns | |
---|---|
boolean |