T - data type of the resultpublic abstract class PendingResultBase<T> extends java.lang.Object implements PendingResult<T>
| Constructor and Description |
|---|
PendingResultBase() |
| Modifier and Type | Method and Description |
|---|---|
Result<T> |
await()
Block until a Result is available.
|
Result<T> |
await(long timeout,
java.util.concurrent.TimeUnit timeUnit)
Block until a Result is received or in has expired.
|
void |
cancel()
Cancel this PendingResultBase to stop receiving callbacks.
|
void |
deliverError(java.lang.Throwable t) |
void |
deliverResult(Result<T> result) |
boolean |
isCanceled() |
PendingResult<T> |
setErrorCallback(ErrorCallback errorCallback)
Set callback notified if this PendingResult fails
|
public void cancel()
cancel in interface PendingResult<T>public boolean isCanceled()
isCanceled in interface PendingResult<T>public Result<T> await()
PendingResult.await(long, TimeUnit)await in interface PendingResult<T>public Result<T> await(long timeout, java.util.concurrent.TimeUnit timeUnit)
await in interface PendingResult<T>timeout - the timeouttimeUnit - the TimeUnit in which timeout is interpreted.public PendingResult<T> setErrorCallback(ErrorCallback errorCallback)
setErrorCallback in interface PendingResult<T>errorCallback - the callbackpublic void deliverError(java.lang.Throwable t)