| java.lang.Object |
| ↳ |
com.facebook.datasource.DataSources |
Class Overview
Static utility methods pertaining to the DataSource interface.
Summary
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
final
void
|
wait()
|
|
Public Methods
public
static
DataSource<T>
immediateDataSource
(T result)
public
static
DataSource<T>
immediateFailedDataSource
(Throwable failure)
public
static
T
waitForFinalResult
(DataSource<T> dataSource)
This methods blocks the calling thread until the DataSource has a final result, has
been cancelled or has failed.
Parameters
| dataSource |
The DataSource to wait for. The caller MUST close the data source
after this method returned! |
Returns
- The final result of the
DataSource. Intermediate results are ignored. Might be
null if the data source has been cancelled.