|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object java.util.concurrent.AbstractExecutorService java.util.concurrent.ThreadPoolExecutor com.taobao.metamorphosis.gregor.slave.OrderedThreadPoolExecutor
public class OrderedThreadPoolExecutor
源自mina的OrderedThreadPoolExecutor,为适应notify remoting做了适当改造
嵌套类摘要 | |
---|---|
static class |
OrderedThreadPoolExecutor.TasksQueue
A class used to store the ordered list of events to be processed by the session, and the current task state. |
从类 java.util.concurrent.ThreadPoolExecutor 继承的嵌套类/接口 |
---|
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy |
构造方法摘要 | |
---|---|
OrderedThreadPoolExecutor()
Creates a default ThreadPool, with default values : - minimum pool size is 0 - maximum pool size is 16 - keepAlive set to 30 seconds - A default ThreadFactory - All events are accepted |
|
OrderedThreadPoolExecutor(int maximumPoolSize)
Creates a default ThreadPool, with default values : - minimum pool size is 0 - keepAlive set to 30 seconds - A default ThreadFactory - All events are accepted |
|
OrderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize)
Creates a default ThreadPool, with default values : - keepAlive set to 30 seconds - A default ThreadFactory - All events are accepted |
|
OrderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit)
Creates a default ThreadPool, with default values : - A default ThreadFactory - All events are accepted |
|
OrderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
ThreadFactory threadFactory)
Creates a new instance of a OrderedThreadPoolExecutor. |
|
OrderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
ThreadFactory threadFactory)
|
方法摘要 | |
---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit)
|
void |
execute(Runnable task)
|
int |
getActiveCount()
|
long |
getCompletedTaskCount()
|
int |
getCorePoolSize()
|
int |
getLargestPoolSize()
|
int |
getMaximumPoolSize()
|
int |
getPoolSize()
|
BlockingQueue<Runnable> |
getQueue()
|
long |
getTaskCount()
|
boolean |
isShutdown()
|
boolean |
isTerminated()
|
boolean |
isTerminating()
|
int |
prestartAllCoreThreads()
|
boolean |
prestartCoreThread()
|
void |
purge()
|
boolean |
remove(Runnable task)
|
void |
setCorePoolSize(int corePoolSize)
|
void |
setMaximumPoolSize(int maximumPoolSize)
|
void |
setRejectedExecutionHandler(RejectedExecutionHandler handler)
|
void |
shutdown()
|
List<Runnable> |
shutdownNow()
|
从类 java.util.concurrent.ThreadPoolExecutor 继承的方法 |
---|
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, beforeExecute, finalize, getKeepAliveTime, getRejectedExecutionHandler, getThreadFactory, setKeepAliveTime, setThreadFactory, terminated |
从类 java.util.concurrent.AbstractExecutorService 继承的方法 |
---|
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public OrderedThreadPoolExecutor()
public OrderedThreadPoolExecutor(int maximumPoolSize)
maximumPoolSize
- The maximum pool sizepublic OrderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, ThreadFactory threadFactory)
public OrderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize)
corePoolSize
- The initial pool sizePoolSizemaximumPoolSize
- The maximum pool sizepublic OrderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit)
corePoolSize
- The initial pool sizePoolSizemaximumPoolSize
- The maximum pool sizekeepAliveTime
- Default duration for a threadunit
- Time unit used for the keepAlive valuepublic OrderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, ThreadFactory threadFactory)
corePoolSize
- The initial pool sizePoolSizemaximumPoolSize
- The maximum pool sizekeepAliveTime
- Default duration for a threadunit
- Time unit used for the keepAlive valuethreadFactory
- The factory used to create threadseventQueueHandler
- The queue used to store events方法详细信息 |
---|
public void setRejectedExecutionHandler(RejectedExecutionHandler handler)
ThreadPoolExecutor
中的 setRejectedExecutionHandler
public int getMaximumPoolSize()
ThreadPoolExecutor
中的 getMaximumPoolSize
public void setMaximumPoolSize(int maximumPoolSize)
ThreadPoolExecutor
中的 setMaximumPoolSize
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
ExecutorService
中的 awaitTermination
ThreadPoolExecutor
中的 awaitTermination
InterruptedException
public boolean isShutdown()
ExecutorService
中的 isShutdown
ThreadPoolExecutor
中的 isShutdown
public boolean isTerminated()
ExecutorService
中的 isTerminated
ThreadPoolExecutor
中的 isTerminated
public void shutdown()
ExecutorService
中的 shutdown
ThreadPoolExecutor
中的 shutdown
public List<Runnable> shutdownNow()
ExecutorService
中的 shutdownNow
ThreadPoolExecutor
中的 shutdownNow
public void execute(Runnable task)
Executor
中的 execute
ThreadPoolExecutor
中的 execute
public int getActiveCount()
ThreadPoolExecutor
中的 getActiveCount
public long getCompletedTaskCount()
ThreadPoolExecutor
中的 getCompletedTaskCount
public int getLargestPoolSize()
ThreadPoolExecutor
中的 getLargestPoolSize
public int getPoolSize()
ThreadPoolExecutor
中的 getPoolSize
public long getTaskCount()
ThreadPoolExecutor
中的 getTaskCount
public boolean isTerminating()
ThreadPoolExecutor
中的 isTerminating
public int prestartAllCoreThreads()
ThreadPoolExecutor
中的 prestartAllCoreThreads
public boolean prestartCoreThread()
ThreadPoolExecutor
中的 prestartCoreThread
public BlockingQueue<Runnable> getQueue()
ThreadPoolExecutor
中的 getQueue
public void purge()
ThreadPoolExecutor
中的 purge
public boolean remove(Runnable task)
ThreadPoolExecutor
中的 remove
public int getCorePoolSize()
ThreadPoolExecutor
中的 getCorePoolSize
public void setCorePoolSize(int corePoolSize)
ThreadPoolExecutor
中的 setCorePoolSize
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |