@PublicApi public class DataLoaderFactory extends java.lang.Object
DataLoader
sConstructor and Description |
---|
DataLoaderFactory() |
Modifier and Type | Method and Description |
---|---|
static <K,V> DataLoader<K,V> |
newDataLoader(BatchLoader<K,V> batchLoadFunction)
Creates new DataLoader with the specified batch loader function and default options
(batching, caching and unlimited batch size).
|
static <K,V> DataLoader<K,V> |
newDataLoader(BatchLoader<K,V> batchLoadFunction,
DataLoaderOptions options)
Creates new DataLoader with the specified batch loader function with the provided options
|
static <K,V> DataLoader<K,V> |
newDataLoader(BatchLoaderWithContext<K,V> batchLoadFunction)
Creates new DataLoader with the specified batch loader function and default options
(batching, caching and unlimited batch size).
|
static <K,V> DataLoader<K,V> |
newDataLoader(BatchLoaderWithContext<K,V> batchLoadFunction,
DataLoaderOptions options)
Creates new DataLoader with the specified batch loader function with the provided options
|
static <K,V> DataLoader<K,V> |
newDataLoaderWithTry(BatchLoader<K,Try<V>> batchLoadFunction)
Creates new DataLoader with the specified batch loader function and default options
(batching, caching and unlimited batch size) where the batch loader function returns a list of
Try objects. |
static <K,V> DataLoader<K,V> |
newDataLoaderWithTry(BatchLoader<K,Try<V>> batchLoadFunction,
DataLoaderOptions options)
Creates new DataLoader with the specified batch loader function and with the provided options
where the batch loader function returns a list of
Try objects. |
static <K,V> DataLoader<K,V> |
newDataLoaderWithTry(BatchLoaderWithContext<K,Try<V>> batchLoadFunction)
Creates new DataLoader with the specified batch loader function and default options
(batching, caching and unlimited batch size) where the batch loader function returns a list of
Try objects. |
static <K,V> DataLoader<K,V> |
newDataLoaderWithTry(BatchLoaderWithContext<K,Try<V>> batchLoadFunction,
DataLoaderOptions options)
Creates new DataLoader with the specified batch loader function and with the provided options
where the batch loader function returns a list of
Try objects. |
static <K,V> DataLoader<K,V> |
newMappedDataLoader(MappedBatchLoader<K,V> batchLoadFunction)
Creates new DataLoader with the specified batch loader function and default options
(batching, caching and unlimited batch size).
|
static <K,V> DataLoader<K,V> |
newMappedDataLoader(MappedBatchLoader<K,V> batchLoadFunction,
DataLoaderOptions options)
Creates new DataLoader with the specified batch loader function with the provided options
|
static <K,V> DataLoader<K,V> |
newMappedDataLoader(MappedBatchLoaderWithContext<K,V> batchLoadFunction)
Creates new DataLoader with the specified mapped batch loader function and default options
(batching, caching and unlimited batch size).
|
static <K,V> DataLoader<K,V> |
newMappedDataLoader(MappedBatchLoaderWithContext<K,V> batchLoadFunction,
DataLoaderOptions options)
Creates new DataLoader with the specified batch loader function with the provided options
|
static <K,V> DataLoader<K,V> |
newMappedDataLoaderWithTry(MappedBatchLoader<K,Try<V>> batchLoadFunction)
Creates new DataLoader with the specified batch loader function and default options
(batching, caching and unlimited batch size) where the batch loader function returns a list of
Try objects. |
static <K,V> DataLoader<K,V> |
newMappedDataLoaderWithTry(MappedBatchLoader<K,Try<V>> batchLoadFunction,
DataLoaderOptions options)
Creates new DataLoader with the specified batch loader function and with the provided options
where the batch loader function returns a list of
Try objects. |
static <K,V> DataLoader<K,V> |
newMappedDataLoaderWithTry(MappedBatchLoaderWithContext<K,Try<V>> batchLoadFunction)
Creates new DataLoader with the specified batch loader function and default options
(batching, caching and unlimited batch size) where the batch loader function returns a list of
Try objects. |
static <K,V> DataLoader<K,V> |
newMappedDataLoaderWithTry(MappedBatchLoaderWithContext<K,Try<V>> batchLoadFunction,
DataLoaderOptions options)
Creates new DataLoader with the specified batch loader function and with the provided options
where the batch loader function returns a list of
Try objects. |
public static <K,V> DataLoader<K,V> newDataLoader(BatchLoader<K,V> batchLoadFunction)
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to usepublic static <K,V> DataLoader<K,V> newDataLoader(BatchLoader<K,V> batchLoadFunction, DataLoaderOptions options)
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to useoptions
- the options to usepublic static <K,V> DataLoader<K,V> newDataLoaderWithTry(BatchLoader<K,Try<V>> batchLoadFunction)
Try
objects.
If its important you to know the exact status of each item in a batch call and whether it threw exceptions then you can use this form to create the data loader.
Using Try objects allows you to capture a value returned or an exception that might have occurred trying to get a value. .
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to use that uses Try
objectspublic static <K,V> DataLoader<K,V> newDataLoaderWithTry(BatchLoader<K,Try<V>> batchLoadFunction, DataLoaderOptions options)
Try
objects.K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to use that uses Try
objectsoptions
- the options to usenewDataLoaderWithTry(BatchLoader)
public static <K,V> DataLoader<K,V> newDataLoader(BatchLoaderWithContext<K,V> batchLoadFunction)
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to usepublic static <K,V> DataLoader<K,V> newDataLoader(BatchLoaderWithContext<K,V> batchLoadFunction, DataLoaderOptions options)
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to useoptions
- the options to usepublic static <K,V> DataLoader<K,V> newDataLoaderWithTry(BatchLoaderWithContext<K,Try<V>> batchLoadFunction)
Try
objects.
If its important you to know the exact status of each item in a batch call and whether it threw exceptions then you can use this form to create the data loader.
Using Try objects allows you to capture a value returned or an exception that might have occurred trying to get a value. .
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to use that uses Try
objectspublic static <K,V> DataLoader<K,V> newDataLoaderWithTry(BatchLoaderWithContext<K,Try<V>> batchLoadFunction, DataLoaderOptions options)
Try
objects.K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to use that uses Try
objectsoptions
- the options to usenewDataLoaderWithTry(BatchLoader)
public static <K,V> DataLoader<K,V> newMappedDataLoader(MappedBatchLoader<K,V> batchLoadFunction)
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to usepublic static <K,V> DataLoader<K,V> newMappedDataLoader(MappedBatchLoader<K,V> batchLoadFunction, DataLoaderOptions options)
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to useoptions
- the options to usepublic static <K,V> DataLoader<K,V> newMappedDataLoaderWithTry(MappedBatchLoader<K,Try<V>> batchLoadFunction)
Try
objects.
If its important you to know the exact status of each item in a batch call and whether it threw exceptions then you can use this form to create the data loader.
Using Try objects allows you to capture a value returned or an exception that might have occurred trying to get a value. .
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to use that uses Try
objectspublic static <K,V> DataLoader<K,V> newMappedDataLoaderWithTry(MappedBatchLoader<K,Try<V>> batchLoadFunction, DataLoaderOptions options)
Try
objects.K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to use that uses Try
objectsoptions
- the options to usenewDataLoaderWithTry(BatchLoader)
public static <K,V> DataLoader<K,V> newMappedDataLoader(MappedBatchLoaderWithContext<K,V> batchLoadFunction)
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to usepublic static <K,V> DataLoader<K,V> newMappedDataLoader(MappedBatchLoaderWithContext<K,V> batchLoadFunction, DataLoaderOptions options)
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to useoptions
- the options to usepublic static <K,V> DataLoader<K,V> newMappedDataLoaderWithTry(MappedBatchLoaderWithContext<K,Try<V>> batchLoadFunction)
Try
objects.
If its important you to know the exact status of each item in a batch call and whether it threw exceptions then you can use this form to create the data loader.
Using Try objects allows you to capture a value returned or an exception that might have occurred trying to get a value. .
K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to use that uses Try
objectspublic static <K,V> DataLoader<K,V> newMappedDataLoaderWithTry(MappedBatchLoaderWithContext<K,Try<V>> batchLoadFunction, DataLoaderOptions options)
Try
objects.K
- the key typeV
- the value typebatchLoadFunction
- the batch load function to use that uses Try
objectsoptions
- the options to usenewDataLoaderWithTry(BatchLoader)