Back to Fresco

DataSources

docs/javadoc/reference/com/facebook/datasource/DataSources.html

3.6.012.6 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Packages | Classes

Summary: Methods | Inherited Methods | [Expand All]

public class

DataSources

extends Object

| java.lang.Object | | ↳ | com.facebook.datasource.DataSources |

Class Overview

Static utility methods pertaining to the DataSource interface.

Summary

Public Methods
static <T> Supplier<DataSource<T>>
static <T> DataSource<T>
static <T> DataSource<T>
static <T> T
This methods blocks the calling thread until the DataSource has a final result, has been cancelled or has failed.

| [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 Supplier<DataSource<T>> getFailedDataSourceSupplier(Throwable failure)

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.
Throws

| Throwable | if the DataSource has failed |

+Generated by Doclava. +