public class UnorderedThreadPoolExecutor extends ThreadPoolExecutor
ThreadPoolExecutor
that does not maintain the order of IoEvent
s.
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, toString
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
public 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 ThreadPoolExecutor
public int getMaximumPoolSize()
getMaximumPoolSize
in class ThreadPoolExecutor
public void setMaximumPoolSize(int maximumPoolSize)
setMaximumPoolSize
in class ThreadPoolExecutor
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface ExecutorService
awaitTermination
in class ThreadPoolExecutor
InterruptedException
public boolean isShutdown()
isShutdown
in interface ExecutorService
isShutdown
in class ThreadPoolExecutor
public boolean isTerminated()
isTerminated
in interface ExecutorService
isTerminated
in class ThreadPoolExecutor
public void shutdown()
shutdown
in interface ExecutorService
shutdown
in class ThreadPoolExecutor
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
shutdownNow
in class ThreadPoolExecutor
public void execute(Runnable task)
execute
in interface Executor
execute
in class ThreadPoolExecutor
public int getActiveCount()
getActiveCount
in class ThreadPoolExecutor
public long getCompletedTaskCount()
getCompletedTaskCount
in class ThreadPoolExecutor
public int getLargestPoolSize()
getLargestPoolSize
in class ThreadPoolExecutor
public int getPoolSize()
getPoolSize
in class ThreadPoolExecutor
public long getTaskCount()
getTaskCount
in class ThreadPoolExecutor
public boolean isTerminating()
isTerminating
in class ThreadPoolExecutor
public int prestartAllCoreThreads()
prestartAllCoreThreads
in class ThreadPoolExecutor
public boolean prestartCoreThread()
prestartCoreThread
in class ThreadPoolExecutor
public void purge()
purge
in class ThreadPoolExecutor
public boolean remove(Runnable task)
remove
in class ThreadPoolExecutor
public int getCorePoolSize()
getCorePoolSize
in class ThreadPoolExecutor
public void setCorePoolSize(int corePoolSize)
setCorePoolSize
in class ThreadPoolExecutor
Copyright © 2004–2016 Apache MINA Project. All rights reserved.