public class UserThreadPool extends Object
| 构造器和说明 |
|---|
UserThreadPool() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
销毁线程池.
|
int |
getCorePoolSize()
Gets core pool size.
|
ThreadPoolExecutor |
getExecutor()
Gets executor.
|
int |
getKeepAliveTime()
Gets keep alive time.
|
int |
getMaximumPoolSize()
Gets maximum pool size.
|
int |
getQueueSize()
Gets queue size.
|
String |
getThreadPoolName()
Gets thread pool name.
|
void |
init()
初始化线程池
|
boolean |
isAllowCoreThreadTimeOut()
Is allow core thread time out boolean.
|
boolean |
isPrestartAllCoreThreads()
Is prestart all core threads boolean.
|
UserThreadPool |
setAllowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
Sets allow core thread time out.
|
UserThreadPool |
setCorePoolSize(int corePoolSize)
Sets core pool size.
|
UserThreadPool |
setKeepAliveTime(int keepAliveTime)
Sets keep alive time.
|
UserThreadPool |
setMaximumPoolSize(int maximumPoolSize)
Sets maximum pool size.
|
UserThreadPool |
setPrestartAllCoreThreads(boolean prestartAllCoreThreads)
Sets prestart all core threads.
|
UserThreadPool |
setQueueSize(int queueSize)
Sets queue size.
|
UserThreadPool |
setThreadPoolName(String threadPoolName)
Sets thread pool name.
|
public void init()
public void destroy()
public int getCorePoolSize()
public UserThreadPool setCorePoolSize(int corePoolSize)
corePoolSize - the core pool sizepublic int getMaximumPoolSize()
public UserThreadPool setMaximumPoolSize(int maximumPoolSize)
maximumPoolSize - the maximum pool sizepublic int getQueueSize()
public UserThreadPool setQueueSize(int queueSize)
queueSize - the queue sizepublic String getThreadPoolName()
public UserThreadPool setThreadPoolName(String threadPoolName)
threadPoolName - the thread pool namepublic boolean isAllowCoreThreadTimeOut()
public UserThreadPool setAllowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
allowCoreThreadTimeOut - the allow core thread time outpublic boolean isPrestartAllCoreThreads()
public UserThreadPool setPrestartAllCoreThreads(boolean prestartAllCoreThreads)
prestartAllCoreThreads - the prestart all core threadspublic int getKeepAliveTime()
public UserThreadPool setKeepAliveTime(int keepAliveTime)
keepAliveTime - the keep alive timepublic ThreadPoolExecutor getExecutor()
Copyright © 2008–2018 The Ant Financial. All rights reserved.