public static class RetryableResult.Incomplete<T> extends Object implements RetryableResult<T>
RetryableOperation
to indicate
that the operation should be retried.RetryableResult.Failure<T>, RetryableResult.Incomplete<T>, RetryableResult.Success<T>
Modifier and Type | Method and Description |
---|---|
T |
get()
Return the result of the retriable operation if the operation succeeds.
|
static <T> RetryableResult.Incomplete<T> |
instance() |
boolean |
shouldRetry()
Returns a boolean indicating if the operation should be retried.
|
boolean |
shouldStop()
Returns a boolean indicating that the
OperationRetryer should
no longer retry the operation and return null as a result of
the operation. |
public static <T> RetryableResult.Incomplete<T> instance()
public T get()
RetryableResult
get
in interface RetryableResult<T>
public boolean shouldRetry()
RetryableResult
OperationRetryer
may still decide to not retry this operation, for
example if the number of retries have reached or timeout has expired.shouldRetry
in interface RetryableResult<T>
public boolean shouldStop()
RetryableResult
OperationRetryer
should
no longer retry the operation and return null
as a result of
the operation.shouldStop
in interface RetryableResult<T>