public static <T> Supplier<DataSource<T>> getFailedDataSourceSupplier(final Throwable failure) {
    return new Supplier<DataSource<T>>() {
      @Override
      public DataSource<T> get() {
        return DataSources.immediateFailedDataSource(failure);
      }
    };
  }
Static utility methods pertaining to the {@link DataSource} interface.
fbcore/src/main/java/com/facebook/datasource/DataSources.java