public class


extends Object
implements Supplier<T>
   ↳ com.facebook.datasource.FirstAvailableDataSourceSupplier<T>

Class Overview

DataSource supplier that provides a data source which will forward results of the first available data source.

Data sources are obtained in order. Only if the current data source fails, or if it finishes without result, the next one will be tried.


Public Methods
static <T> FirstAvailableDataSourceSupplier<T> create(List<Supplier<DataSource<T>>> dataSourceSuppliers)
boolean equals(Object other)
DataSource<T> get()
Retrieves an instance of the appropriate type.
int hashCode()
String toString()
Inherited Methods
From class java.lang.Object
From interface com.facebook.common.internal.Supplier

Public Methods

public static FirstAvailableDataSourceSupplier<T> create (List<Supplier<DataSource<T>>> dataSourceSuppliers)

public boolean equals (Object other)

public DataSource<T> get ()

Retrieves an instance of the appropriate type. The returned object may or may not be a new instance, depending on the implementation.

  • an instance of the appropriate type

public int hashCode ()

public String toString ()