Class ConcurrencyUtil
java.lang.Object
org.stianloader.picoresolve.internal.ConcurrencyUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NotNull CompletableFuture<T>configureFallback(CompletableFuture<T> mains, Supplier<CompletableFuture<T>> fallback) static <T> @NotNull CompletableFuture<T>exceptionally(CompletableFuture<T> main, Function<Throwable, T> fn) static <T> @NotNull CompletableFuture<T>static <T,C extends Collection<T>>
@NotNull CompletableFuture<C>thenAdd(@NotNull CompletableFuture<C> collectionProvider, @NotNull CompletableFuture<T> valueProvider)
-
Constructor Details
-
ConcurrencyUtil
public ConcurrencyUtil()
-
-
Method Details
-
schedule
@NotNull public static <T> @NotNull CompletableFuture<T> schedule(@NotNull @NotNull Callable<T> source, @NotNull @NotNull Executor executor) -
configureFallback
@NotNull public static <T> @NotNull CompletableFuture<T> configureFallback(CompletableFuture<T> mains, Supplier<CompletableFuture<T>> fallback) -
exceptionally
@NotNull public static <T> @NotNull CompletableFuture<T> exceptionally(CompletableFuture<T> main, Function<Throwable, T> fn) -
thenAdd
@NotNull public static <T,C extends Collection<T>> @NotNull CompletableFuture<C> thenAdd(@NotNull @NotNull CompletableFuture<C> collectionProvider, @NotNull @NotNull CompletableFuture<T> valueProvider)
-