| java.lang.Object | |
| ↳ | com.facebook.datasource.DataSources |
Static utility methods pertaining to the DataSource interface.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static <T> Supplier<DataSource<T>> | getFailedDataSourceSupplier(Throwable failure) | ||||||||||
| static <T> DataSource<T> | immediateDataSource(T result) | ||||||||||
| static <T> DataSource<T> | immediateFailedDataSource(Throwable failure) | ||||||||||
| static <T> T |
waitForFinalResult(DataSource<T> dataSource)
This methods blocks the calling thread until the
DataSource has a final result, has
been cancelled or has failed. | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
This methods blocks the calling thread until the DataSource has a final result, has
been cancelled or has failed.
| dataSource | The DataSource to wait for. The caller MUST close the data source
after this method returned! |
|---|
DataSource. Intermediate results are ignored. Might be
null if the data source has been cancelled.| Throwable | if the DataSource has failed
|
|---|