Non-blocking call that returns
setCompleted has been invoked on this instance,
Sets the status to completed.
Sets the status to failed without changing the completion status.
IllegalStateException if this method is invoked on this instance after
setCompleted has been invoked on this instance.
Blocking call that waits until completion, as indicated by an invocation of
setCompleted on this instance, then returns returns
setFailed was called on this instance, else returns
Blocking call that returns only after
setCompleted has been invoked on this
Registers the passed function to be executed when this status completes.