Returns either the next intermediate result block produced by this task
or null if all these blocks have been returned already to
earlier calls of this function.
Returns true if the execution of this task has completed successfully,
and returns false if either the execution is still running (in which
case isRunning() is true) or the execution has
been interrupted (in which case isRunning() is false).
Returns true if the execution of this task is currently running;
that is, the execution has started and has neither been interrupted
nor completed.
isCompleted
booleanisCompleted()
Returns true if the execution of this task has completed successfully,
and returns false if either the execution is still running (in which
case isRunning() is true) or the execution has
been interrupted (in which case isRunning() is false).
hasFailed
booleanhasFailed()
Returns true if the execution of this task has failed with an
exception. The exception that caused the failed can be obtained
by calling getCauseOfFailure().
Returns either the next intermediate result block produced by this task
or null if all these blocks have been returned already to
earlier calls of this function. If no next block is currently available
at the time when this function is called, then the call of this function
causes the calling thread to wait until the next block has been produced
(or it has become clear that no more blocks can be produced anymore).