public class DynamicThreadPoolExecutor extends AbstractDynamicExecutorSupport
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicyawaitTerminationMillis, waitForTasksToCompleteOnShutdown| 构造器和说明 |
|---|
DynamicThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
long executeTimeOut,
boolean waitForTasksToCompleteOnShutdown,
long awaitTerminationMillis,
@NonNull BlockingQueue<Runnable> workQueue,
@NonNull String threadPoolId,
@NonNull ThreadFactory threadFactory,
@NonNull RejectedExecutionHandler handler) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
protected void |
beforeExecute(Thread t,
Runnable r) |
void |
execute(@NonNull Runnable command) |
Long |
getRejectCountNum() |
protected ExecutorService |
initializeExecutor()
Create the target
ExecutorService instance. |
afterPropertiesSet, cancelRemainingTask, destroy, initialize, setSupportParam, shutdownSupportallowCoreThreadTimeOut, 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 DynamicThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
long executeTimeOut,
boolean waitForTasksToCompleteOnShutdown,
long awaitTerminationMillis,
@NonNull
@NonNull BlockingQueue<Runnable> workQueue,
@NonNull
@NonNull String threadPoolId,
@NonNull
@NonNull ThreadFactory threadFactory,
@NonNull
@NonNull RejectedExecutionHandler handler)
public void execute(@NonNull
@NonNull Runnable command)
execute 在接口中 Executorexecute 在类中 ThreadPoolExecutorprotected void beforeExecute(Thread t, Runnable r)
beforeExecute 在类中 ThreadPoolExecutorprotected void afterExecute(Runnable r, Throwable t)
afterExecute 在类中 ThreadPoolExecutorprotected ExecutorService initializeExecutor()
AbstractDynamicExecutorSupportExecutorService instance.
Called by afterPropertiesSet.initializeExecutor 在类中 AbstractDynamicExecutorSupportAbstractDynamicExecutorSupport.afterPropertiesSet()public Long getRejectCountNum()
Copyright © 2022. All rights reserved.