public class AsyncInvocation extends Invocation
RetryPolicy.completed, lastFailure, lastResult| Modifier and Type | Method and Description |
|---|---|
void |
complete()
Completes the invocation and the associated
RecurrentFuture. |
boolean |
complete(Object result)
Attempts to complete the invocation and the associated
RecurrentFuture with the result. |
boolean |
complete(Object result,
Throwable failure)
Attempts to complete the invocation and the associated
RecurrentFuture with the result and
failure. |
boolean |
retry()
Attempts to retry a failed invocation.
|
boolean |
retryFor(Object result)
Attempts to retry a failed invocation.
|
boolean |
retryFor(Object result,
Throwable failure)
Attempts to retry a failed invocation.
|
boolean |
retryOn(Throwable failure)
Attempts to retry a failed invocation.
|
canRetryFor, canRetryFor, canRetryOn, getAttemptCount, getLastFailure, getLastResult, getWaitTime, isComplete, recordFailurepublic void complete()
RecurrentFuture.complete in class InvocationIllegalStateException - if the invocation is already completepublic boolean complete(Object result)
RecurrentFuture with the result. Returns
true on success, else false if completion failed and should be retried via retry().complete in class InvocationIllegalStateException - if the invocation is already completepublic boolean complete(Object result, Throwable failure)
RecurrentFuture with the result and
failure. Returns true on success, else false if completion failed and should be retried via
retry().IllegalStateException - if the invocation is already completepublic boolean retry()
RecurrentFuture.IllegalStateException - if a retry method has already been called or the invocation is already completepublic boolean retryFor(Object result)
result, else
returns false and completes the invocation and associated RecurrentFuture.IllegalStateException - if a retry method has already been called or the invocation is already completepublic boolean retryFor(Object result, Throwable failure)
result and
failure, else returns false and completes the invocation and associated RecurrentFuture.IllegalStateException - if a retry method has already been called or the invocation is already completepublic boolean retryOn(Throwable failure)
failure, else
returns false and completes the invocation and associated RecurrentFuture exceptionally.NullPointerException - if failure is nullIllegalStateException - if a retry method has already been called or the invocation is already completeCopyright © 2015. All Rights Reserved.