java.lang.Object | |
↳ | com.facebook.datasource.IncreasingQualityDataSourceSupplier<T> |
DataSource
supplier that provides a data source which forwards results of the underlying
data sources with the increasing quality.
Data sources are obtained in order. The first data source in array is considered to be of the highest quality. The first data source to provide an result gets forwarded until one of the higher quality data sources provides its final image at which point that data source gets forwarded (and so on). That being said, only the first data source to provide an result is streamed.
Outcome (success/failure) of the data source provided by this supplier is determined by the outcome of the highest quality data source (the first data source in the array).
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static <T> IncreasingQualityDataSourceSupplier<T> |
create(List<Supplier<DataSource<T>>> dataSourceSuppliers)
Creates a new data source supplier with increasing-quality strategy.
| ||||||||||
boolean | equals(Object other) | ||||||||||
DataSource<T> |
get()
Retrieves an instance of the appropriate type.
| ||||||||||
int | hashCode() | ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates a new data source supplier with increasing-quality strategy.
Note: for performance reasons the list doesn't get cloned, so the caller of this method should not modify the list once passed in here.
dataSourceSuppliers | list of underlying suppliers |
---|
Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.