public class ThreadPoolExecutorAdapter extends Object implements ExecutorAdapter<ThreadPoolExecutor>
ThreadPoolExecutor.ExecutorAdapter.UnsupportedBlockingQueue| 构造器和说明 |
|---|
ThreadPoolExecutorAdapter(ThreadPoolExecutor executor) |
| 限定符和类型 | 方法和说明 |
|---|---|
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
|
ThreadPoolExecutor |
getOriginal()
Get the original executor
|
int |
getPoolSize()
Get the pool size
|
BlockingQueue<Runnable> |
getQueue()
Get the queue
|
RejectedExecutionHandler |
getRejectedExecutionHandler()
Get the rejected execution handler
|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRejectHandlerNamepublic ThreadPoolExecutorAdapter(ThreadPoolExecutor executor)
public ThreadPoolExecutor getOriginal()
ExecutorAdaptergetOriginal 在接口中 ExecutorAdapter<ThreadPoolExecutor>public void execute(Runnable command)
ExecutorAdapterexecute 在接口中 ExecutorAdapter<ThreadPoolExecutor>execute 在接口中 Executorcommand - the runnable taskpublic int getCorePoolSize()
ExecutorAdaptergetCorePoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>public void setCorePoolSize(int corePoolSize)
ExecutorAdaptersetCorePoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>corePoolSize - the core pool sizepublic int getMaximumPoolSize()
ExecutorAdaptergetMaximumPoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>public void setMaximumPoolSize(int maximumPoolSize)
ExecutorAdaptersetMaximumPoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>maximumPoolSize - the maximum pool sizepublic int getPoolSize()
ExecutorAdaptergetPoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>public int getActiveCount()
ExecutorAdaptergetActiveCount 在接口中 ExecutorAdapter<ThreadPoolExecutor>public int getLargestPoolSize()
ExecutorAdaptergetLargestPoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>public long getTaskCount()
ExecutorAdaptergetTaskCount 在接口中 ExecutorAdapter<ThreadPoolExecutor>public long getCompletedTaskCount()
ExecutorAdaptergetCompletedTaskCount 在接口中 ExecutorAdapter<ThreadPoolExecutor>public BlockingQueue<Runnable> getQueue()
ExecutorAdaptergetQueue 在接口中 ExecutorAdapter<ThreadPoolExecutor>public RejectedExecutionHandler getRejectedExecutionHandler()
ExecutorAdaptergetRejectedExecutionHandler 在接口中 ExecutorAdapter<ThreadPoolExecutor>public void setRejectedExecutionHandler(RejectedExecutionHandler handler)
ExecutorAdaptersetRejectedExecutionHandler 在接口中 ExecutorAdapter<ThreadPoolExecutor>handler - the rejected execution handlerpublic boolean allowsCoreThreadTimeOut()
ExecutorAdapterallowsCoreThreadTimeOut 在接口中 ExecutorAdapter<ThreadPoolExecutor>public void allowCoreThreadTimeOut(boolean value)
ExecutorAdapterallowCoreThreadTimeOut 在接口中 ExecutorAdapter<ThreadPoolExecutor>value - if allow core thread time outpublic long getKeepAliveTime(TimeUnit unit)
ExecutorAdaptergetKeepAliveTime 在接口中 ExecutorAdapter<ThreadPoolExecutor>unit - the time unitpublic void setKeepAliveTime(long time,
TimeUnit unit)
ExecutorAdaptersetKeepAliveTime 在接口中 ExecutorAdapter<ThreadPoolExecutor>time - the keep alive timeunit - the time unitCopyright © 2023. All rights reserved.