code: public boolean isCanceledOrFailed() {
  		return executionState == ExecutionState.CANCELING ||
  				executionState == ExecutionState.CANCELED ||
  				executionState == ExecutionState.FAILED;
  	}
docs: Checks whether the task has failed, is canceled, or is being canceled at the moment.
  @return True is the task in state FAILED, CANCELING, or CANCELED, false otherwise.