public class OrderedThreadPoolExecutor
extends java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor
that maintains the order of IoEvent
s.
If you don't need to maintain the order of events per session, please use
UnorderedThreadPoolExecutor
.
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
OrderedThreadPoolExecutor() |
OrderedThreadPoolExecutor(int maximumPoolSize) |
OrderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize) |
OrderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit) |
OrderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
IoEventQueueHandler queueHandler) |
OrderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.ThreadFactory threadFactory) |
OrderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.ThreadFactory threadFactory,
IoEventQueueHandler queueHandler) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
execute(java.lang.Runnable task) |
int |
getActiveCount() |
long |
getCompletedTaskCount() |
int |
getCorePoolSize() |
int |
getLargestPoolSize() |
int |
getMaximumPoolSize() |
int |
getPoolSize() |
java.util.concurrent.BlockingQueue<java.lang.Runnable> |
getQueue() |
IoEventQueueHandler |
getQueueHandler() |
long |
getTaskCount() |
boolean |
isShutdown() |
boolean |
isTerminated() |
boolean |
isTerminating() |
int |
prestartAllCoreThreads() |
boolean |
prestartCoreThread() |
void |
purge() |
boolean |
remove(java.lang.Runnable task) |
void |
setCorePoolSize(int corePoolSize) |
void |
setMaximumPoolSize(int maximumPoolSize) |
void |
setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler handler) |
void |
shutdown() |
java.util.List<java.lang.Runnable> |
shutdownNow() |
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, beforeExecute, finalize, getKeepAliveTime, getRejectedExecutionHandler, getThreadFactory, setKeepAliveTime, setThreadFactory, terminated, toString
public OrderedThreadPoolExecutor()
public OrderedThreadPoolExecutor(int maximumPoolSize)
public OrderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize)
public OrderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit)
public OrderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, IoEventQueueHandler queueHandler)
public OrderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.ThreadFactory threadFactory)
public OrderedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.ThreadFactory threadFactory, IoEventQueueHandler queueHandler)
public IoEventQueueHandler getQueueHandler()
public void setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler handler)
setRejectedExecutionHandler
in class java.util.concurrent.ThreadPoolExecutor
public int getMaximumPoolSize()
getMaximumPoolSize
in class java.util.concurrent.ThreadPoolExecutor
public void setMaximumPoolSize(int maximumPoolSize)
setMaximumPoolSize
in class java.util.concurrent.ThreadPoolExecutor
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
awaitTermination
in interface java.util.concurrent.ExecutorService
awaitTermination
in class java.util.concurrent.ThreadPoolExecutor
java.lang.InterruptedException
public boolean isShutdown()
isShutdown
in interface java.util.concurrent.ExecutorService
isShutdown
in class java.util.concurrent.ThreadPoolExecutor
public boolean isTerminated()
isTerminated
in interface java.util.concurrent.ExecutorService
isTerminated
in class java.util.concurrent.ThreadPoolExecutor
public void shutdown()
shutdown
in interface java.util.concurrent.ExecutorService
shutdown
in class java.util.concurrent.ThreadPoolExecutor
public java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow
in interface java.util.concurrent.ExecutorService
shutdownNow
in class java.util.concurrent.ThreadPoolExecutor
public void execute(java.lang.Runnable task)
execute
in interface java.util.concurrent.Executor
execute
in class java.util.concurrent.ThreadPoolExecutor
public int getActiveCount()
getActiveCount
in class java.util.concurrent.ThreadPoolExecutor
public long getCompletedTaskCount()
getCompletedTaskCount
in class java.util.concurrent.ThreadPoolExecutor
public int getLargestPoolSize()
getLargestPoolSize
in class java.util.concurrent.ThreadPoolExecutor
public int getPoolSize()
getPoolSize
in class java.util.concurrent.ThreadPoolExecutor
public long getTaskCount()
getTaskCount
in class java.util.concurrent.ThreadPoolExecutor
public boolean isTerminating()
isTerminating
in class java.util.concurrent.ThreadPoolExecutor
public int prestartAllCoreThreads()
prestartAllCoreThreads
in class java.util.concurrent.ThreadPoolExecutor
public boolean prestartCoreThread()
prestartCoreThread
in class java.util.concurrent.ThreadPoolExecutor
public java.util.concurrent.BlockingQueue<java.lang.Runnable> getQueue()
getQueue
in class java.util.concurrent.ThreadPoolExecutor
public void purge()
purge
in class java.util.concurrent.ThreadPoolExecutor
public boolean remove(java.lang.Runnable task)
remove
in class java.util.concurrent.ThreadPoolExecutor
public int getCorePoolSize()
getCorePoolSize
in class java.util.concurrent.ThreadPoolExecutor
public void setCorePoolSize(int corePoolSize)
setCorePoolSize
in class java.util.concurrent.ThreadPoolExecutor
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.