Interface MonitoredCallable<T>

Type Parameters:
T - the type of result
All Superinterfaces:
Callable<T>

public interface MonitoredCallable<T> extends Callable<T>
Extension of Callable 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 corresponding MonitoredFuture for status following completion will return the final result.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the statistics for this callable
    Returns the partial status or the final result if already complete.

    Methods inherited from interface java.util.concurrent.Callable

    call
  • Method Details

    • 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