public class RunOnce extends java.lang.Object implements RetryPolicy
RetryPolicy.RetryPolicyFactory| Constructor and Description |
|---|
RunOnce() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowRetry()
Ask the policy if a retry is allowed.
|
void |
begin()
Operation is starting
|
RetryPolicy |
duplicate()
Duplicate this policy into a fresh instance
|
void |
failure(java.lang.Exception e)
Operation has failed
|
static RunOnce |
get() |
int |
getAttemptCount()
Return the number of attempts since begin was called
|
void |
success()
Operation has completed successfully
|
java.lang.String |
toString() |
public static RunOnce instance
public static RunOnce get()
public void begin()
RetryPolicybegin in interface RetryPolicypublic void success()
RetryPolicysuccess in interface RetryPolicypublic void failure(java.lang.Exception e)
RetryPolicyfailure in interface RetryPolicypublic boolean allowRetry()
RetryPolicyallowRetry in interface RetryPolicypublic int getAttemptCount()
RetryPolicygetAttemptCount in interface RetryPolicypublic RetryPolicy duplicate()
RetryPolicyduplicate in interface RetryPolicypublic java.lang.String toString()
toString in class java.lang.Object