public class Async
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Async.CFFactory<T,U> |
Constructor and Description |
---|
Async() |
Modifier and Type | Method and Description |
---|---|
static <T,U> java.util.concurrent.CompletableFuture<java.util.List<U>> |
each(java.util.Collection<T> list,
java.util.function.BiFunction<T,java.lang.Integer,java.util.concurrent.CompletableFuture<U>> cfFactory) |
static <U> java.util.concurrent.CompletableFuture<java.util.List<U>> |
each(java.util.List<java.util.concurrent.CompletableFuture<U>> futures) |
static <T,U> java.util.concurrent.CompletableFuture<java.util.List<U>> |
eachSequentially(java.lang.Iterable<T> list,
Async.CFFactory<T,U> cfFactory) |
static <T> java.util.concurrent.CompletableFuture<T> |
exceptionallyCompletedFuture(java.lang.Throwable exception) |
static <U,T> java.util.concurrent.CompletableFuture<java.util.List<U>> |
flatMap(java.util.List<T> inputs,
java.util.function.Function<T,java.util.concurrent.CompletableFuture<U>> mapper) |
static <U,T> java.util.concurrent.CompletableFuture<java.util.List<U>> |
map(java.util.concurrent.CompletableFuture<java.util.List<T>> values,
java.util.function.Function<T,U> mapper) |
static <U,T> java.util.List<java.util.concurrent.CompletableFuture<U>> |
map(java.util.List<java.util.concurrent.CompletableFuture<T>> values,
java.util.function.Function<T,U> mapper) |
static <U,T> java.util.List<java.util.concurrent.CompletableFuture<U>> |
mapCompose(java.util.List<java.util.concurrent.CompletableFuture<T>> values,
java.util.function.Function<T,java.util.concurrent.CompletableFuture<U>> mapper) |
static <T> java.util.concurrent.CompletableFuture<T> |
toCompletableFuture(T t)
Turns an object T into a CompletableFuture if its not already
|
static <T> java.util.concurrent.CompletableFuture<T> |
tryCatch(java.util.function.Supplier<java.util.concurrent.CompletableFuture<T>> supplier) |
public static <U> java.util.concurrent.CompletableFuture<java.util.List<U>> each(java.util.List<java.util.concurrent.CompletableFuture<U>> futures)
public static <T,U> java.util.concurrent.CompletableFuture<java.util.List<U>> each(java.util.Collection<T> list, java.util.function.BiFunction<T,java.lang.Integer,java.util.concurrent.CompletableFuture<U>> cfFactory)
public static <T,U> java.util.concurrent.CompletableFuture<java.util.List<U>> eachSequentially(java.lang.Iterable<T> list, Async.CFFactory<T,U> cfFactory)
public static <T> java.util.concurrent.CompletableFuture<T> toCompletableFuture(T t)
T
- for twot
- - the object to checkpublic static <T> java.util.concurrent.CompletableFuture<T> tryCatch(java.util.function.Supplier<java.util.concurrent.CompletableFuture<T>> supplier)
public static <T> java.util.concurrent.CompletableFuture<T> exceptionallyCompletedFuture(java.lang.Throwable exception)
public static <U,T> java.util.concurrent.CompletableFuture<java.util.List<U>> flatMap(java.util.List<T> inputs, java.util.function.Function<T,java.util.concurrent.CompletableFuture<U>> mapper)
public static <U,T> java.util.concurrent.CompletableFuture<java.util.List<U>> map(java.util.concurrent.CompletableFuture<java.util.List<T>> values, java.util.function.Function<T,U> mapper)
public static <U,T> java.util.List<java.util.concurrent.CompletableFuture<U>> map(java.util.List<java.util.concurrent.CompletableFuture<T>> values, java.util.function.Function<T,U> mapper)
public static <U,T> java.util.List<java.util.concurrent.CompletableFuture<U>> mapCompose(java.util.List<java.util.concurrent.CompletableFuture<T>> values, java.util.function.Function<T,java.util.concurrent.CompletableFuture<U>> mapper)