Package | Description |
---|---|
org.dataloader |
Modifier and Type | Method and Description |
---|---|
static <V> Try<V> |
Try.failed(Throwable throwable)
Creates a Try that has failed with the provided throwable
|
<U> Try<U> |
Try.flatMap(Function<? super V,Try<U>> mapper)
Flats maps the Try into another Try type
|
<U> Try<U> |
Try.map(Function<? super V,U> mapper)
Maps the Try into another Try with a different type
|
Try<V> |
Try.recover(Function<Throwable,V> recoverFunction)
Called the recover function of the Try failed otherwise returns this if it was successful.
|
static <V> Try<V> |
Try.succeeded(V value)
Creates a Try that has succeeded with the provided value
|
static <V> Try<V> |
Try.tryCall(Callable<V> callable)
Calls the callable and if it returns a value, the Try is successful with that value or if throws
and exception the Try captures that
|
Modifier and Type | Method and Description |
---|---|
static <V> CompletionStage<Try<V>> |
Try.tryStage(CompletionStage<V> completionStage)
Creates a CompletionStage that, when it completes, will capture into a Try whether the given completionStage
was successful or not
|
Modifier and Type | Method and Description |
---|---|
<U> Try<U> |
Try.flatMap(Function<? super V,Try<U>> mapper)
Flats maps the Try into another Try type
|
static <K,V> DataLoader<K,V> |
DataLoader.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> |
DataLoader.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> |
DataLoader.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> |
DataLoader.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> |
DataLoader.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> |
DataLoader.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> |
DataLoader.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> |
DataLoader.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. |
Copyright © 2017–2021. All rights reserved.