public class Invocation extends RetryStats
| Constructor and Description |
|---|
Invocation(RetryPolicy retryPolicy) |
| Modifier and Type | Method and Description |
|---|---|
void |
complete()
Completes the invocation, allowing any futures waiting on the invocation to complete.
|
void |
complete(Object result)
Completes the invocation with the
result, allowing any futures waiting on the invocation to complete. |
void |
completeExceptionally(Throwable failure)
Completes the invocation with the given
failure, allowing any waiting futures to complete. |
boolean |
retry()
Retries a failed invocation, returning true if the retry can be attempted else false if the retry policy has been
exceeded.
|
boolean |
retryOn(Throwable failure)
Retries a failed invocation, returning true if the retry can be attempted for the
failure else false if the
retry policy has been exceeded. |
boolean |
retryWhen(Object result)
Retries a failed invocation, returning true if the retry can be attempted for the
result else false if the
retry policy has been exceeded. |
boolean |
retryWhen(Object result,
Throwable failure)
Retries a failed invocation, returning true if the retry can be attempted for the
result and
failure else false if the retry policy has been exceeded. |
canRetryOn, canRetryWhen, canRetryWhen, getRetryCount, getWaitTimepublic Invocation(RetryPolicy retryPolicy)
public void complete()
IllegalStateException - if complete or retry has already been calledpublic void complete(Object result)
result, allowing any futures waiting on the invocation to complete.IllegalStateException - if complete or retry has already been calledpublic void completeExceptionally(Throwable failure)
failure, allowing any waiting futures to complete.IllegalStateException - if complete or retry has already been calledpublic boolean retry()
IllegalStateException - if retry or complete has already been calledpublic boolean retryOn(Throwable failure)
failure else false if the
retry policy has been exceeded.NullPointerException - if failure is nullIllegalStateException - if retry or complete has already been calledpublic boolean retryWhen(Object result)
result else false if the
retry policy has been exceeded.NullPointerException - if result is nullIllegalStateException - if retry or complete has already been calledpublic boolean retryWhen(Object result, Throwable failure)
result and
failure else false if the retry policy has been exceeded.IllegalStateException - if retry or complete has already been calledCopyright © 2015. All Rights Reserved.