public interface ExecutionStrategy
| Modifier and Type | Field and Description |
|---|---|
static ExecutionStrategy |
SAME_TREAD
This execution strategy always communicates with backend in current thread
|
| Modifier and Type | Method and Description |
|---|---|
static ExecutionStrategy |
background(Executor executor)
This execution strategy always communicates with backend in specified executor
|
static ExecutionStrategy |
backgroundTimeBounded(Executor executor,
ScheduledExecutorService timeoutCheckingExecutor,
Duration timeout)
This execution strategy always communicates with backend in specified executor
|
<T> T |
execute(Supplier<T> supplier) |
<T> CompletableFuture<T> |
executeAsync(Supplier<CompletableFuture<T>> supplier) |
static final ExecutionStrategy SAME_TREAD
<T> T execute(Supplier<T> supplier)
<T> CompletableFuture<T> executeAsync(Supplier<CompletableFuture<T>> supplier)
static ExecutionStrategy background(Executor executor)
static ExecutionStrategy backgroundTimeBounded(Executor executor, ScheduledExecutorService timeoutCheckingExecutor, Duration timeout)
Copyright © 2024. All rights reserved.