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.
| ||||||||||
static <T> IncreasingQualityDataSourceSupplier<T> |
create(List<Supplier<DataSource<T>>> dataSourceSuppliers, boolean dataSourceLazy)
Creates a new data source supplier with increasing-quality strategy with optional lazy state
creation.
| ||||||||||
boolean | equals(Object other) | ||||||||||
DataSource<T> |
get()
Retrieves an instance of the appropriate type.
| ||||||||||
int | hashCode() | ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.facebook.common.internal.Supplier
|
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 |
---|
Creates a new data source supplier with increasing-quality strategy with optional lazy state creation.
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 |
---|---|
dataSourceLazy | if true, the state of data source would be created only if necessary |
Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.