public interface AddonThreadPoolUser extends MainProvider
Modifier and Type | Method and Description |
---|---|
default CompletableFuture<Void> |
submit(Runnable runnable)
submits the Runnable to the AddOns Thread-Pool
|
default <U> CompletableFuture<U> |
submit(java.util.function.Supplier<U> supplier)
submits the Supplier to the AddOns Thread-Pool
|
default <U,V extends Future<U>> |
timeOut(Collection<? extends V> futures,
int milliseconds)
times out the collection of futures
|
default CompletableFuture<Void> submit(Runnable runnable)
runnable
- the runnable to submitdefault <U> CompletableFuture<U> submit(java.util.function.Supplier<U> supplier)
U
- the return typesupplier
- the supplier executeddefault <U,V extends Future<U>> List<V> timeOut(Collection<? extends V> futures, int milliseconds) throws InterruptedException
U
- the return type of the futuresV
- the type of the futuresfutures
- the collection of futuresmilliseconds
- the limit in milliseconds (everything under 20 milliseconds makes no sense)InterruptedException
- if the process was interruptedCopyright © 2016. All rights reserved.