public class Invocation extends Object
| 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 futures waiting on the invocation to
complete. |
int |
getRetryCount()
Gets the number of retries that have been attempted so far.
|
boolean |
retry()
Retries a failed invocation, returning true if the invocation's retry policy has not been exceeded, else false.
|
boolean |
retry(Throwable failure)
Retries a failed invocation, returning true if the invocation's retry policy has not been exceeded, else false.
|
public void complete()
IllegalStateException - if complete or retry has already been calledpublic void completeExceptionally(Throwable failure)
failure, allowing any futures waiting on the invocation to
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 int getRetryCount()
public boolean retry()
IllegalStateException - if retry or complete has already been calledpublic boolean retry(Throwable failure)
NullPointerException - if failure is nullIllegalStateException - if retry or complete has already been calledCopyright © 2015. All Rights Reserved.