public class DtpExecutor extends DtpLifecycleSupport implements SpringExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicyawaitTerminationSeconds, threadPoolName, waitForTasksToCompleteOnShutdown| 构造器和说明 |
|---|
DtpExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
ThreadFactory threadFactory,
RejectedExecutionHandler handler) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
protected void |
beforeExecute(Thread t,
Runnable r) |
void |
execute(Runnable command) |
void |
execute(Runnable task,
long startTimeout) |
List<NotifyItem> |
getNotifyItems() |
int |
getQueueCapacity() |
String |
getQueueName() |
long |
getQueueTimeoutCount() |
long |
getRejectCount() |
String |
getRejectHandlerName() |
long |
getRunTimeoutCount() |
String |
getThreadPoolAliasName() |
void |
incRejectCount(int count) |
protected void |
initialize(DtpProperties dtpProperties)
Initialize, do sth.
|
boolean |
isNotifyEnabled() |
void |
setAllowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
In order for the field can be assigned by reflection.
|
void |
setNotifyEnabled(boolean notifyEnabled) |
void |
setNotifyItems(List<NotifyItem> notifyItems) |
void |
setPreStartAllCoreThreads(boolean preStartAllCoreThreads) |
void |
setQueueTimeout(long queueTimeout) |
void |
setRejectHandlerName(String rejectHandlerName) |
void |
setRunTimeout(long runTimeout) |
void |
setTaskWrappers(List<TaskWrapper> taskWrappers) |
void |
setThreadPoolAliasName(String threadPoolAliasName) |
afterPropertiesSet, cancelRemainingTask, destroy, getThreadPoolName, internalShutdown, setAwaitTerminationSeconds, setThreadPoolName, setWaitForTasksToCompleteOnShutdownallowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic DtpExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
ThreadFactory threadFactory,
RejectedExecutionHandler handler)
public void execute(Runnable task, long startTimeout)
execute 在接口中 org.springframework.core.task.AsyncTaskExecutorpublic void execute(Runnable command)
execute 在接口中 Executorexecute 在接口中 org.springframework.core.task.TaskExecutorexecute 在类中 ThreadPoolExecutorprotected void beforeExecute(Thread t, Runnable r)
beforeExecute 在类中 ThreadPoolExecutorprotected void afterExecute(Runnable r, Throwable t)
afterExecute 在类中 ThreadPoolExecutorprotected void initialize(DtpProperties dtpProperties)
DtpLifecycleSupportinitialize 在类中 DtpLifecycleSupportdtpProperties - dtpPropertiespublic List<NotifyItem> getNotifyItems()
public void setNotifyItems(List<NotifyItem> notifyItems)
public String getQueueName()
public int getQueueCapacity()
public String getRejectHandlerName()
public void setRejectHandlerName(String rejectHandlerName)
public void setTaskWrappers(List<TaskWrapper> taskWrappers)
public void setPreStartAllCoreThreads(boolean preStartAllCoreThreads)
public void incRejectCount(int count)
public long getRejectCount()
public void setRunTimeout(long runTimeout)
public long getRunTimeoutCount()
public long getQueueTimeoutCount()
public void setQueueTimeout(long queueTimeout)
public void setAllowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
allowCoreThreadTimeOut - allowCoreThreadTimeOutpublic String getThreadPoolAliasName()
public void setThreadPoolAliasName(String threadPoolAliasName)
public boolean isNotifyEnabled()
public void setNotifyEnabled(boolean notifyEnabled)
Copyright © 2023. All rights reserved.