public class UnorderedThreadPoolExecutor extends ThreadPoolExecutor
ThreadPoolExecutor that does not maintain the order of IoEvents.
This means more than one event handler methods can be invoked at the same
time with mixed order. For example, let's assume that messageReceived, messageSent,
and sessionClosed events are fired.
OrderedThreadPoolExecutor.ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
UnorderedThreadPoolExecutor() |
UnorderedThreadPoolExecutor(int maximumPoolSize) |
UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize) |
UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit) |
UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
IoEventQueueHandler queueHandler) |
UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
ThreadFactory threadFactory) |
UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
ThreadFactory threadFactory,
IoEventQueueHandler queueHandler) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
void |
execute(Runnable task) |
int |
getActiveCount() |
long |
getCompletedTaskCount() |
int |
getCorePoolSize() |
int |
getLargestPoolSize() |
int |
getMaximumPoolSize() |
int |
getPoolSize() |
IoEventQueueHandler |
getQueueHandler() |
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() |
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, beforeExecute, finalize, getKeepAliveTime, getQueue, getRejectedExecutionHandler, getThreadFactory, setKeepAliveTime, setThreadFactory, terminated, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic UnorderedThreadPoolExecutor()
public UnorderedThreadPoolExecutor(int maximumPoolSize)
public UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize)
public UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit)
public UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
IoEventQueueHandler queueHandler)
public UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
ThreadFactory threadFactory)
public UnorderedThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
ThreadFactory threadFactory,
IoEventQueueHandler queueHandler)
public IoEventQueueHandler getQueueHandler()
public void setRejectedExecutionHandler(RejectedExecutionHandler handler)
setRejectedExecutionHandler in class ThreadPoolExecutorpublic int getMaximumPoolSize()
getMaximumPoolSize in class ThreadPoolExecutorpublic void setMaximumPoolSize(int maximumPoolSize)
setMaximumPoolSize in class ThreadPoolExecutorpublic boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface ExecutorServiceawaitTermination in class ThreadPoolExecutorInterruptedExceptionpublic boolean isShutdown()
isShutdown in interface ExecutorServiceisShutdown in class ThreadPoolExecutorpublic boolean isTerminated()
isTerminated in interface ExecutorServiceisTerminated in class ThreadPoolExecutorpublic void shutdown()
shutdown in interface ExecutorServiceshutdown in class ThreadPoolExecutorpublic List<Runnable> shutdownNow()
shutdownNow in interface ExecutorServiceshutdownNow in class ThreadPoolExecutorpublic void execute(Runnable task)
execute in interface Executorexecute in class ThreadPoolExecutorpublic int getActiveCount()
getActiveCount in class ThreadPoolExecutorpublic long getCompletedTaskCount()
getCompletedTaskCount in class ThreadPoolExecutorpublic int getLargestPoolSize()
getLargestPoolSize in class ThreadPoolExecutorpublic int getPoolSize()
getPoolSize in class ThreadPoolExecutorpublic long getTaskCount()
getTaskCount in class ThreadPoolExecutorpublic boolean isTerminating()
isTerminating in class ThreadPoolExecutorpublic int prestartAllCoreThreads()
prestartAllCoreThreads in class ThreadPoolExecutorpublic boolean prestartCoreThread()
prestartCoreThread in class ThreadPoolExecutorpublic void purge()
purge in class ThreadPoolExecutorpublic boolean remove(Runnable task)
remove in class ThreadPoolExecutorpublic int getCorePoolSize()
getCorePoolSize in class ThreadPoolExecutorpublic void setCorePoolSize(int corePoolSize)
setCorePoolSize in class ThreadPoolExecutor