public final class CapturedExecutor extends Object implements ExecutorAdapter<ExecutorAdapter<?>>
BaseNotifyCtx during AlarmManager.doAlarm(com.dtp.core.support.ExecutorWrapper, com.dtp.common.em.NotifyItemEnum).
In other words, this can ensure that the thread pool status when the alarm threshold is triggered is
consistent with the content in the AbstractDtpNotifier.buildAlarmContent(com.dtp.common.entity.NotifyPlatform, com.dtp.common.em.NotifyItemEnum)
ExecutorAdapter.UnsupportedBlockingQueue| 构造器和说明 |
|---|
CapturedExecutor(ExecutorAdapter<?> executorAdapter) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
allowCoreThreadTimeOut(boolean value)
Allow core thread time out
|
boolean |
allowsCoreThreadTimeOut()
If allow core thread time out
|
void |
execute(Runnable command)
Execute the task
|
int |
getActiveCount()
Get the active count
|
long |
getCompletedTaskCount()
Get the completed task count
|
int |
getCorePoolSize()
Get the core pool size
|
long |
getKeepAliveTime(TimeUnit unit)
Get the keep alive time
|
int |
getLargestPoolSize()
Get the largest pool size
|
int |
getMaximumPoolSize()
Get the maximum pool size
|
ExecutorAdapter<?> |
getOriginal()
Get the original executor
|
int |
getPoolSize()
Get the pool size
|
BlockingQueue<Runnable> |
getQueue()
Get the queue
|
RejectedExecutionHandler |
getRejectedExecutionHandler()
Get the rejected execution handler
|
String |
getRejectHandlerName()
Get the reject handler name
|
long |
getTaskCount()
Get the task count
|
void |
setCorePoolSize(int corePoolSize)
Set the core pool size
|
void |
setKeepAliveTime(long time,
TimeUnit unit)
Set the keep alive time
|
void |
setMaximumPoolSize(int maximumPoolSize)
Set the maximum pool size
|
void |
setRejectedExecutionHandler(RejectedExecutionHandler handler)
Set the rejected execution handler
|
public CapturedExecutor(ExecutorAdapter<?> executorAdapter)
public ExecutorAdapter<?> getOriginal()
ExecutorAdaptergetOriginal 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public void execute(Runnable command)
ExecutorAdapterexecute 在接口中 ExecutorAdapter<ExecutorAdapter<?>>execute 在接口中 Executorcommand - the runnable taskpublic int getCorePoolSize()
ExecutorAdaptergetCorePoolSize 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public void setCorePoolSize(int corePoolSize)
ExecutorAdaptersetCorePoolSize 在接口中 ExecutorAdapter<ExecutorAdapter<?>>corePoolSize - the core pool sizepublic int getMaximumPoolSize()
ExecutorAdaptergetMaximumPoolSize 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public void setMaximumPoolSize(int maximumPoolSize)
ExecutorAdaptersetMaximumPoolSize 在接口中 ExecutorAdapter<ExecutorAdapter<?>>maximumPoolSize - the maximum pool sizepublic int getPoolSize()
ExecutorAdaptergetPoolSize 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public int getActiveCount()
ExecutorAdaptergetActiveCount 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public int getLargestPoolSize()
ExecutorAdaptergetLargestPoolSize 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public long getTaskCount()
ExecutorAdaptergetTaskCount 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public long getCompletedTaskCount()
ExecutorAdaptergetCompletedTaskCount 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public BlockingQueue<Runnable> getQueue()
ExecutorAdaptergetQueue 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public RejectedExecutionHandler getRejectedExecutionHandler()
ExecutorAdaptergetRejectedExecutionHandler 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public void setRejectedExecutionHandler(RejectedExecutionHandler handler)
ExecutorAdaptersetRejectedExecutionHandler 在接口中 ExecutorAdapter<ExecutorAdapter<?>>handler - the rejected execution handlerpublic String getRejectHandlerName()
ExecutorAdaptergetRejectHandlerName 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public boolean allowsCoreThreadTimeOut()
ExecutorAdapterallowsCoreThreadTimeOut 在接口中 ExecutorAdapter<ExecutorAdapter<?>>public void allowCoreThreadTimeOut(boolean value)
ExecutorAdapterallowCoreThreadTimeOut 在接口中 ExecutorAdapter<ExecutorAdapter<?>>value - if allow core thread time outpublic long getKeepAliveTime(TimeUnit unit)
ExecutorAdaptergetKeepAliveTime 在接口中 ExecutorAdapter<ExecutorAdapter<?>>unit - the time unitpublic void setKeepAliveTime(long time,
TimeUnit unit)
ExecutorAdaptersetKeepAliveTime 在接口中 ExecutorAdapter<ExecutorAdapter<?>>time - the keep alive timeunit - the time unitCopyright © 2023. All rights reserved.