-
- Type Parameters:
T
- the type of result
- All Superinterfaces:
Callable<T>
public interface MonitoredCallable<T> extends Callable<T>
Extension ofCallable
that provides a way to get its current status prior to execution completion. Note that the type of status must be the same as the final result: this has the nice property that querying the correspondingMonitoredFuture
for status following completion will return the final result.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<RuntimeStatistic<?>>
getStatistics()
Returns the statistics for this callableT
getStatus()
Returns the partial status or the final result if already complete.
-
-
-
Method Detail
-
getStatistics
List<RuntimeStatistic<?>> getStatistics()
Returns the statistics for this callable- Returns:
- the statistics for this callable
-
getStatus
T getStatus()
Returns the partial status or the final result if already complete. This method should not ever throw an exception. It should always be possible to obtain a status, even if callable itself fails.- Returns:
- the partial status
-
-