public class DefaultAsyncTaskExecutor extends Object implements AsyncTaskExecutor
| Modifier and Type | Field and Description |
|---|---|
protected AsyncTaskExecutorConfiguration |
configuration |
protected boolean |
executorNeedsShutdown
Whether the executor needs a shutdown.
|
protected ExecutorService |
executorService
The executor service used for task execution.
|
protected org.slf4j.Logger |
logger |
protected RejectedExecutionHandler |
rejectedExecutionHandler |
protected ThreadFactory |
threadFactory |
protected BlockingQueue<Runnable> |
threadPoolQueue
The queue used for job execution work
|
| Constructor and Description |
|---|
DefaultAsyncTaskExecutor() |
DefaultAsyncTaskExecutor(AsyncTaskExecutorConfiguration configuration) |
protected final org.slf4j.Logger logger
protected final AsyncTaskExecutorConfiguration configuration
protected ExecutorService executorService
protected boolean executorNeedsShutdown
protected BlockingQueue<Runnable> threadPoolQueue
protected ThreadFactory threadFactory
protected RejectedExecutionHandler rejectedExecutionHandler
public DefaultAsyncTaskExecutor()
public DefaultAsyncTaskExecutor(AsyncTaskExecutorConfiguration configuration)
public void execute(Runnable task)
execute in interface AsyncTaskExecutorpublic CompletableFuture<?> submit(Runnable task)
submit in interface AsyncTaskExecutorpublic <T> CompletableFuture<T> submit(Callable<T> task)
submit in interface AsyncTaskExecutorpublic void start()
public void shutdown()
shutdown in interface AsyncTaskExecutorprotected ExecutorService initializeExecutor()
public AsyncTaskExecutorConfiguration getConfiguration()
public int getCorePoolSize()
public void setCorePoolSize(int corePoolSize)
public int getMaxPoolSize()
public void setMaxPoolSize(int maxPoolSize)
public long getKeepAliveTime()
public void setKeepAliveTime(long keepAliveTime)
public int getQueueSize()
public void setQueueSize(int queueSize)
public boolean isAllowCoreThreadTimeout()
public void setAllowCoreThreadTimeout(boolean allowCoreThreadTimeout)
public long getSecondsToWaitOnShutdown()
public void setSecondsToWaitOnShutdown(long secondsToWaitOnShutdown)
public BlockingQueue<Runnable> getThreadPoolQueue()
public void setThreadPoolQueue(BlockingQueue<Runnable> threadPoolQueue)
public String getThreadPoolNamingPattern()
public void setThreadPoolNamingPattern(String threadPoolNamingPattern)
public ThreadFactory getThreadFactory()
public void setThreadFactory(ThreadFactory threadFactory)
public RejectedExecutionHandler getRejectedExecutionHandler()
public void setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler)
public int getRemainingCapacity()
getRemainingCapacity in interface AsyncTaskExecutorCopyright © 2022 Flowable. All rights reserved.