public class SmallRyeManagedExecutor extends Object implements org.eclipse.microprofile.context.ManagedExecutor
Modifier and Type | Class and Description |
---|---|
static class |
SmallRyeManagedExecutor.Builder |
Constructor and Description |
---|
SmallRyeManagedExecutor(int maxAsync,
int maxQueued,
SmallRyeThreadContext threadContext,
ExecutorService executor,
String injectionPointName) |
public SmallRyeManagedExecutor(int maxAsync, int maxQueued, SmallRyeThreadContext threadContext, ExecutorService executor, String injectionPointName)
public static ExecutorService newThreadPoolExecutor(int maxAsync, int maxQueued)
public void shutdown()
shutdown
in interface ExecutorService
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
public boolean isShutdown()
isShutdown
in interface ExecutorService
public boolean isTerminated()
isTerminated
in interface ExecutorService
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface ExecutorService
InterruptedException
public <T> Future<T> submit(Callable<T> task)
submit
in interface ExecutorService
public <T> Future<T> submit(Runnable task, T result)
submit
in interface ExecutorService
public Future<?> submit(Runnable task)
submit
in interface ExecutorService
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll
in interface ExecutorService
InterruptedException
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll
in interface ExecutorService
InterruptedException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny
in interface ExecutorService
InterruptedException
ExecutionException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny
in interface ExecutorService
InterruptedException
ExecutionException
TimeoutException
public <U> CompletableFuture<U> completedFuture(U value)
completedFuture
in interface org.eclipse.microprofile.context.ManagedExecutor
public <U> CompletionStage<U> completedStage(U value)
completedStage
in interface org.eclipse.microprofile.context.ManagedExecutor
public <U> CompletableFuture<U> failedFuture(Throwable ex)
failedFuture
in interface org.eclipse.microprofile.context.ManagedExecutor
public <U> CompletionStage<U> failedStage(Throwable ex)
failedStage
in interface org.eclipse.microprofile.context.ManagedExecutor
public CompletableFuture<Void> runAsync(Runnable runnable)
runAsync
in interface org.eclipse.microprofile.context.ManagedExecutor
public <U> CompletableFuture<U> supplyAsync(java.util.function.Supplier<U> supplier)
supplyAsync
in interface org.eclipse.microprofile.context.ManagedExecutor
public <U> CompletableFuture<U> newIncompleteFuture()
newIncompleteFuture
in interface org.eclipse.microprofile.context.ManagedExecutor
public ThreadContextProviderPlan getThreadContextProviderPlan()
public int getMaxAsync()
public int getMaxQueued()
public String getInjectionPointName()
Copyright © 2019 JBoss by Red Hat. All rights reserved.