public interface RetryPolicy
This policy can be used it to automatically recover from temporary problems like expired sessions, service unavailable, network issues.
|Modifier and Type||Interface and Description|
Context about an invocation.
RetryPolicy.RetrySpec onInvocationError(java.lang.RuntimeException error, RetryPolicy.RetryContext retryContext, int invocationAttempt)
The error can be any exception that can be reported by the stub. See
AsyncCallback.onError(RuntimeException) for details on possible
The method is expected to return a retry specification. This
specification will be used to retry the invocation. If the method
null or throws a
will be no further attempts and the invocation will fail.
error- invocation error; must not be null
retryContext- context about the invocation error; must not be
invocationAttempt- number of the invocation attempt; first attempt is 0, second attempt (after error on retry) is 1, etc.
nullmeans no retry