Interface AsyncResult<V>
- Type Parameters:
V
- Type used to complete the future.
- All Known Implementing Classes:
BalancedClientFuture
,ClientFuture
,ConservativeClientFuture
,NoOpAsyncResult
,ProgressiveClientFuture
public interface AsyncResult<V>
Defines a result interface for Asynchronous operations.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
If the operation succeeds the resulting value produced is set to null and the waiting parties are signaled.void
failed
(ClientException result) If the operation fails this method is invoked with the Exception that caused the failure.boolean
Returns true if the AsyncResult has completed.
-
Method Details
-
failed
If the operation fails this method is invoked with the Exception that caused the failure.- Parameters:
result
- The error that resulted in this asynchronous operation failing.
-
complete
If the operation succeeds the resulting value produced is set to null and the waiting parties are signaled.- Parameters:
result
- the object that completes the future.
-
isComplete
boolean isComplete()Returns true if the AsyncResult has completed. The task is considered complete regardless if it succeeded or failed.- Returns:
- returns true if the asynchronous operation has completed.
-