E - the executor typepublic interface ExecutorAdapter<E extends Executor> extends Executor
ThreadPoolExecutor.| 限定符和类型 | 接口和说明 |
|---|---|
static class |
ExecutorAdapter.UnsupportedBlockingQueue |
| 限定符和类型 | 方法和说明 |
|---|---|
default void |
allowCoreThreadTimeOut(boolean value)
Allow core thread time out
|
default boolean |
allowsCoreThreadTimeOut()
If allow core thread time out
|
default void |
execute(Runnable command)
Execute the task
|
int |
getActiveCount()
Get the active count
|
default long |
getCompletedTaskCount()
Get the completed task count
|
int |
getCorePoolSize()
Get the core pool size
|
default long |
getKeepAliveTime(TimeUnit unit)
Get the keep alive time
|
default int |
getLargestPoolSize()
Get the largest pool size
|
int |
getMaximumPoolSize()
Get the maximum pool size
|
E |
getOriginal()
Get the original executor
|
int |
getPoolSize()
Get the pool size
|
default BlockingQueue<Runnable> |
getQueue()
Get the queue
|
default RejectedExecutionHandler |
getRejectedExecutionHandler()
Get the rejected execution handler
|
default String |
getRejectHandlerName()
Get the reject handler name
|
default long |
getTaskCount()
Get the task count
|
void |
setCorePoolSize(int corePoolSize)
Set the core pool size
|
default void |
setKeepAliveTime(long time,
TimeUnit unit)
Set the keep alive time
|
void |
setMaximumPoolSize(int maximumPoolSize)
Set the maximum pool size
|
default void |
setRejectedExecutionHandler(RejectedExecutionHandler handler)
Set the rejected execution handler
|
E getOriginal()
default void execute(Runnable command)
int getCorePoolSize()
void setCorePoolSize(int corePoolSize)
corePoolSize - the core pool sizeint getMaximumPoolSize()
void setMaximumPoolSize(int maximumPoolSize)
maximumPoolSize - the maximum pool sizeint getPoolSize()
int getActiveCount()
default int getLargestPoolSize()
default long getTaskCount()
default long getCompletedTaskCount()
default BlockingQueue<Runnable> getQueue()
default RejectedExecutionHandler getRejectedExecutionHandler()
default void setRejectedExecutionHandler(RejectedExecutionHandler handler)
handler - the rejected execution handlerdefault String getRejectHandlerName()
default boolean allowsCoreThreadTimeOut()
default void allowCoreThreadTimeOut(boolean value)
value - if allow core thread time outdefault long getKeepAliveTime(TimeUnit unit)
unit - the time unitdefault void setKeepAliveTime(long time,
TimeUnit unit)
time - the keep alive timeunit - the time unitCopyright © 2023. All rights reserved.