- Type Parameters:
T- the type of result.
- All Superinterfaces:
Future<T>
Extension of
Future that allows the client to query for the
partial status. In the same way that Future is an execution
handle to a Callable, a MonitoredFuture is an
execution handle to a MonitoredCallable or to a
DistributedCallable. In the case where it is a
DistributedCallable, the result returned by the future will be the
result of calling DistributedCallable.merge(java.util.List) on each
of the partition results.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the partial status of theMonitoredCallableor the final result if the command has completed successfully.
-
Method Details
-
getStatus
Returns the partial status of theMonitoredCallableor the final result if the command has completed successfully. In the event that the command fails, this will return a status of the command following the exception. In the case where it is aDistributedCallable, the result returned by the future will be the result of callingDistributedCallable.merge(java.util.List)on the status's or final results.- Returns:
- the partial status
- Throws:
ExecutionException- if there was an (I/O) error fetching the status.InterruptedException- if interrupted while waiting for the status. Note that getStatus does not block in the end-to-end sense, but does block waiting for network IO so it can potentially throw InterruptedException
-