-
- Type Parameters:
T- the type of result.
- All Superinterfaces:
Future<T>
public interface MonitoredFuture<T> extends Future<T>
Extension ofFuturethat allows the client to query for the partial status. In the same way thatFutureis an execution handle to aCallable, aMonitoredFutureis an execution handle to aMonitoredCallableor to aDistributedCallable. In the case where it is aDistributedCallable, the result returned by the future will be the result of callingDistributedCallable.merge(java.util.List)on each of the partition results.- See Also:
MonitoredCallable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetStatus()Returns the partial status of theMonitoredCallableor the final result if the command has completed successfully.
-
-
-
Method Detail
-
getStatus
T getStatus() throws ExecutionException, InterruptedException
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
-
-