public class ManagedExecutorServiceImpl extends java.util.concurrent.AbstractExecutorService implements DestroyableResource
Constructor and Description |
---|
ManagedExecutorServiceImpl(java.util.concurrent.ExecutorService delegate,
ContextServiceImpl contextService) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
<U> java.util.concurrent.CompletableFuture<U> |
completedFuture(U value) |
<U> java.util.concurrent.CompletionStage<U> |
completedStage(U value) |
<T> java.util.concurrent.CompletableFuture<T> |
copy(java.util.concurrent.CompletableFuture<T> stage) |
<T> java.util.concurrent.CompletionStage<T> |
copy(java.util.concurrent.CompletionStage<T> stage) |
void |
destroyResource() |
void |
execute(java.lang.Runnable command) |
<U> java.util.concurrent.CompletableFuture<U> |
failedFuture(java.lang.Throwable ex) |
<U> java.util.concurrent.CompletionStage<U> |
failedStage(java.lang.Throwable ex) |
java.lang.Integer |
getActiveCount() |
java.lang.Long |
getCompletedTaskCount() |
ContextService |
getContextService() |
java.lang.Integer |
getCorePoolSize() |
java.util.concurrent.ExecutorService |
getDelegate() |
java.lang.Integer |
getLargestPoolSize() |
java.lang.Integer |
getMaximumPoolSize() |
java.lang.Integer |
getPoolSize() |
java.lang.Integer |
getQueueSize() |
boolean |
isShutdown() |
boolean |
isTerminated() |
<U> java.util.concurrent.CompletableFuture<U> |
newIncompleteFuture() |
java.util.concurrent.CompletableFuture<java.lang.Void> |
runAsync(java.lang.Runnable runnable) |
void |
shutdown() |
java.util.List<java.lang.Runnable> |
shutdownNow() |
<T> java.util.concurrent.Future<T> |
submit(java.util.concurrent.Callable<T> task) |
java.util.concurrent.Future<?> |
submit(java.lang.Runnable task) |
<T> java.util.concurrent.Future<T> |
submit(java.lang.Runnable task,
T result) |
<U> java.util.concurrent.CompletableFuture<U> |
supplyAsync(java.util.function.Supplier<U> supplier) |
public ManagedExecutorServiceImpl(java.util.concurrent.ExecutorService delegate, ContextServiceImpl contextService)
public void shutdown()
shutdown
in interface java.util.concurrent.ExecutorService
public java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow
in interface java.util.concurrent.ExecutorService
public boolean isShutdown()
isShutdown
in interface java.util.concurrent.ExecutorService
public boolean isTerminated()
isTerminated
in interface java.util.concurrent.ExecutorService
public java.lang.Integer getCorePoolSize()
public java.lang.Integer getMaximumPoolSize()
public java.lang.Integer getPoolSize()
public java.lang.Integer getActiveCount()
public java.lang.Integer getLargestPoolSize()
public java.lang.Integer getQueueSize()
public java.lang.Long getCompletedTaskCount()
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
awaitTermination
in interface java.util.concurrent.ExecutorService
java.lang.InterruptedException
public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task)
submit
in interface java.util.concurrent.ExecutorService
submit
in class java.util.concurrent.AbstractExecutorService
public <T> java.util.concurrent.Future<T> submit(java.lang.Runnable task, T result)
submit
in interface java.util.concurrent.ExecutorService
submit
in class java.util.concurrent.AbstractExecutorService
public java.util.concurrent.Future<?> submit(java.lang.Runnable task)
submit
in interface java.util.concurrent.ExecutorService
submit
in class java.util.concurrent.AbstractExecutorService
public void execute(java.lang.Runnable command)
execute
in interface java.util.concurrent.Executor
public java.util.concurrent.ExecutorService getDelegate()
public void destroyResource()
destroyResource
in interface DestroyableResource
public <U> java.util.concurrent.CompletableFuture<U> completedFuture(U value)
public <U> java.util.concurrent.CompletionStage<U> completedStage(U value)
public <T> java.util.concurrent.CompletableFuture<T> copy(java.util.concurrent.CompletableFuture<T> stage)
public <T> java.util.concurrent.CompletionStage<T> copy(java.util.concurrent.CompletionStage<T> stage)
public <U> java.util.concurrent.CompletableFuture<U> failedFuture(java.lang.Throwable ex)
public <U> java.util.concurrent.CompletionStage<U> failedStage(java.lang.Throwable ex)
public ContextService getContextService()
public <U> java.util.concurrent.CompletableFuture<U> newIncompleteFuture()
public java.util.concurrent.CompletableFuture<java.lang.Void> runAsync(java.lang.Runnable runnable)
public <U> java.util.concurrent.CompletableFuture<U> supplyAsync(java.util.function.Supplier<U> supplier)