-
- All Implemented Interfaces:
-
com.facebook.datasource.DataSource
public class ListDataSource<T> extends AbstractDataSource<List<CloseableReference<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.
-
-
Method Summary
Modifier and Type Method Description static <T> ListDataSource<T>create(Array<DataSource<CloseableReference<T>>> dataSources)synchronized List<CloseableReference<T>>getResult()synchronized booleanhasResult()booleanclose()-
Methods inherited from class com.facebook.datasource.AbstractDataSource
close, getDataSourceInstrumenter, getExtras, getFailureCause, getProgress, getResult, hasFailed, hasMultipleResults, hasResult, isClosed, isFinished, provideInstrumenter, subscribe -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-