Package org.stianloader.picoresolve.internal

# Class ConcurrencyUtil

java.lang.Object
org.stianloader.picoresolve.internal.ConcurrencyUtil

public class ConcurrencyUtil extends Object

## Constructor Summary

Constructors
Constructor
Description
`ConcurrencyUtil()`

## Method Summary

Modifier and Type
Method
Description
`static <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>`
`schedule(@NotNull Callable<T> source, @NotNull Executor executor)`
`static <T, C extends Collection<T>>
@NotNull CompletableFuture<C>`
`thenAdd(@NotNull CompletableFuture<C> collectionProvider, @NotNull CompletableFuture<T> valueProvider)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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)