public class AsyncExecutor extends Object
Constructor and Description |
---|
AsyncExecutor()
Instantiates a new async executor.
|
AsyncExecutor(Executor executor)
Instantiates a new async executor.
|
AsyncExecutor(int coreThreadPoolSize,
int maxThreadPoolSize,
long keepAliveTime,
TimeUnit unit)
Instantiates a new async executor.
|
Modifier and Type | Method and Description |
---|---|
<T> List<ContinuableFuture<T>> |
execute(Callable<T>... commands) |
<T> ContinuableFuture<T> |
execute(Callable<T> command) |
<T> ContinuableFuture<T> |
execute(Callable<T> action,
int retryTimes,
long retryInterval,
BiPredicate<? super T,? super Exception> retryCondition) |
<T> List<ContinuableFuture<T>> |
execute(Collection<? extends Callable<T>> commands) |
List<ContinuableFuture<Void>> |
execute(List<? extends Try.Runnable<? extends Exception>> commands) |
List<ContinuableFuture<Void>> |
execute(Try.Runnable<? extends Exception>... commands) |
ContinuableFuture<Void> |
execute(Try.Runnable<? extends Exception> command) |
ContinuableFuture<Void> |
execute(Try.Runnable<? extends Exception> action,
int retryTimes,
long retryInterval,
Predicate<? super Exception> retryCondition) |
public AsyncExecutor()
public AsyncExecutor(int coreThreadPoolSize, int maxThreadPoolSize, long keepAliveTime, TimeUnit unit)
coreThreadPoolSize
- maxThreadPoolSize
- keepAliveTime
- unit
- public AsyncExecutor(Executor executor)
executor
- public ContinuableFuture<Void> execute(Try.Runnable<? extends Exception> command)
command
- @SafeVarargs public final List<ContinuableFuture<Void>> execute(Try.Runnable<? extends Exception>... commands)
commands
- public List<ContinuableFuture<Void>> execute(List<? extends Try.Runnable<? extends Exception>> commands)
commands
- public <T> ContinuableFuture<T> execute(Callable<T> command)
T
- command
- @SafeVarargs public final <T> List<ContinuableFuture<T>> execute(Callable<T>... commands)
T
- commands
- public <T> List<ContinuableFuture<T>> execute(Collection<? extends Callable<T>> commands)
T
- commands
- public ContinuableFuture<Void> execute(Try.Runnable<? extends Exception> action, int retryTimes, long retryInterval, Predicate<? super Exception> retryCondition)
action
- retryTimes
- retryInterval
- retryCondition
- public <T> ContinuableFuture<T> execute(Callable<T> action, int retryTimes, long retryInterval, BiPredicate<? super T,? super Exception> retryCondition)
T
- action
- retryTimes
- retryInterval
- retryCondition
- Copyright © 2019. All rights reserved.