public class DynamicThreadPoolExecutor extends DynamicExecutorConfigurationSupport
| 限定符和类型 | 类和说明 |
|---|---|
static class |
DynamicThreadPoolExecutor.AbortPolicy |
static class |
DynamicThreadPoolExecutor.CallerRunsPolicy |
static class |
DynamicThreadPoolExecutor.DiscardOldestPolicy |
static class |
DynamicThreadPoolExecutor.DiscardPolicy |
| 构造器和说明 |
|---|
DynamicThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
boolean waitForTasksToCompleteOnShutdown,
long awaitTerminationMillis,
@NonNull BlockingQueue<Runnable> workQueue,
@NonNull String threadPoolId,
@NonNull ThreadFactory threadFactory,
@NonNull ThreadPoolAlarm threadPoolAlarm,
@NonNull RejectedExecutionHandler handler) |
afterPropertiesSet, cancelRemainingTask, destroy, initialize, shutdownSupportinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic DynamicThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
boolean waitForTasksToCompleteOnShutdown,
long awaitTerminationMillis,
@NonNull
@NonNull BlockingQueue<Runnable> workQueue,
@NonNull
@NonNull String threadPoolId,
@NonNull
@NonNull ThreadFactory threadFactory,
@NonNull
@NonNull ThreadPoolAlarm threadPoolAlarm,
@NonNull
@NonNull RejectedExecutionHandler handler)
public Integer getRejectCount()
public ThreadPoolAlarm getThreadPoolAlarm()
public void setThreadPoolAlarm(ThreadPoolAlarm threadPoolAlarm)
public String getThreadPoolId()
public void execute(@NonNull
@NonNull Runnable command)
execute 在接口中 Executorexecute 在类中 ThreadPoolExecutorprotected ExecutorService initializeExecutor()
DynamicExecutorConfigurationSupportExecutorService instance.
Called by afterPropertiesSet.initializeExecutor 在类中 DynamicExecutorConfigurationSupportDynamicExecutorConfigurationSupport.afterPropertiesSet()public void shutdown()
shutdown 在接口中 ExecutorServiceshutdown 在类中 ThreadPoolExecutorpublic List<Runnable> shutdownNow()
shutdownNow 在接口中 ExecutorServiceshutdownNow 在类中 ThreadPoolExecutorpublic boolean isShutdown()
isShutdown 在接口中 ExecutorServiceisShutdown 在类中 ThreadPoolExecutorpublic boolean isTerminating()
isTerminating 在类中 ThreadPoolExecutorpublic boolean isTerminated()
isTerminated 在接口中 ExecutorServiceisTerminated 在类中 ThreadPoolExecutorpublic boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination 在接口中 ExecutorServiceawaitTermination 在类中 ThreadPoolExecutorInterruptedExceptionprotected void finalize()
finalize 在类中 ThreadPoolExecutorpublic void setThreadFactory(@NonNull
@NonNull ThreadFactory threadFactory)
setThreadFactory 在类中 ThreadPoolExecutorpublic ThreadFactory getThreadFactory()
getThreadFactory 在类中 ThreadPoolExecutorpublic void setRejectedExecutionHandler(@NonNull
@NonNull RejectedExecutionHandler handler)
public RejectedExecutionHandler getRejectedExecutionHandler()
public void setCorePoolSize(int corePoolSize)
setCorePoolSize 在类中 ThreadPoolExecutorpublic int getCorePoolSize()
getCorePoolSize 在类中 ThreadPoolExecutorpublic boolean prestartCoreThread()
prestartCoreThread 在类中 ThreadPoolExecutorpublic org.springframework.core.task.TaskDecorator getTaskDecorator()
public void setTaskDecorator(org.springframework.core.task.TaskDecorator taskDecorator)
public int prestartAllCoreThreads()
public boolean allowsCoreThreadTimeOut()
public void allowCoreThreadTimeOut(boolean value)
public void setMaximumPoolSize(int maximumPoolSize)
setMaximumPoolSize 在类中 ThreadPoolExecutorpublic int getMaximumPoolSize()
getMaximumPoolSize 在类中 ThreadPoolExecutorpublic void setKeepAliveTime(long time,
TimeUnit unit)
setKeepAliveTime 在类中 ThreadPoolExecutorpublic long getKeepAliveTime(TimeUnit unit)
getKeepAliveTime 在类中 ThreadPoolExecutorpublic BlockingQueue<Runnable> getQueue()
getQueue 在类中 ThreadPoolExecutorpublic boolean remove(Runnable task)
remove 在类中 ThreadPoolExecutorpublic void purge()
purge 在类中 ThreadPoolExecutorpublic int getPoolSize()
getPoolSize 在类中 ThreadPoolExecutorpublic int getActiveCount()
getActiveCount 在类中 ThreadPoolExecutorpublic int getLargestPoolSize()
getLargestPoolSize 在类中 ThreadPoolExecutorpublic long getTaskCount()
getTaskCount 在类中 ThreadPoolExecutorpublic long getCompletedTaskCount()
public String toString()
toString 在类中 ThreadPoolExecutorprotected void beforeExecute(Thread t, Runnable r)
beforeExecute 在类中 ThreadPoolExecutorprotected void afterExecute(Runnable r, Throwable t)
afterExecute 在类中 ThreadPoolExecutorprotected void terminated()
terminated 在类中 ThreadPoolExecutorCopyright © 2021. All rights reserved.