java.lang.Object | ||
↳ | com.facebook.datasource.AbstractDataSource<T> | |
↳ | com.facebook.imagepipeline.datasource.ListDataSource<T> |
Data source that wraps number of other data sources and waits until all of them are finished. After that each call to getResult() returns list of final results of wrapped data sources. Caller of getResult() is responsible for closing all each of the results separately.
This data source does not propagate intermediate results.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ListDataSource(DataSource[]<CloseableReference<T>> dataSources) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
close()
Cancels the ongoing request and releases all associated resources.
| ||||||||||
static <T> ListDataSource<T> | create(DataSource...<CloseableReference<T>> dataSources) | ||||||||||
synchronized List<CloseableReference<T>> |
getResult()
The most recent result of the asynchronous computation.
| ||||||||||
synchronized boolean | hasResult() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.facebook.datasource.AbstractDataSource
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.facebook.datasource.DataSource
|
Cancels the ongoing request and releases all associated resources.
Subsequent calls to getResult()
will return null.
The most recent result of the asynchronous computation.
The caller gains ownership of the object and is responsible for releasing it. Note that subsequent calls to getResult might give different results. Later results should be considered to be of higher quality.
This method will return null in the following cases:
hasResult
returns false).