private synchronized boolean setFailureInternal(
      @Nullable Throwable throwable, @Nullable Map<String, Object> extras) {
    if (mIsClosed || mDataSourceStatus != DataSourceStatus.IN_PROGRESS) {
      return false;
    } else {
      mDataSourceStatus = DataSourceStatus.FAILURE;
      mFailureThrowable = throwable;
      mExtras = extras;
      return true;
    }
  }
Subclasses should invoke this method to set the progress.

<p>This method will return {@code true} if the progress was successfully set, or {@code false}
if the data source has already been set, failed or closed.

<p>This will also notify the subscribers if the progress was successfully set.

<p>Do NOT call this method from a synchronized block as it invokes external code of the
subscribers.

@param progress the progress in range [0, 1] to be set.
@return true if the progress was successfully set.
fbcore/src/main/java/com/facebook/datasource/AbstractDataSource.java