public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwareThreadPoolExecutor
Executor which should be used for downstream ChannelEvent's. This implementation
will take care of preserve the order of the events in a Channel. If you don't need to
preserve the order just use one of the Executor implementations provided by the static
methods of Executors.
OrderedMemoryAwareThreadPoolExecutorOrderedMemoryAwareThreadPoolExecutor.ChildExecutorchildExecutors| 构造器和说明 |
|---|
OrderedDownstreamThreadPoolExecutor(int corePoolSize)
Creates a new instance.
|
OrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit)
Creates a new instance.
|
OrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.ThreadFactory threadFactory)
Creates a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
execute(java.lang.Runnable command) |
protected java.util.concurrent.Executor |
getChildExecutor(ChannelEvent e) |
long |
getMaxChannelMemorySize()
Returns
0L |
long |
getMaxTotalMemorySize()
Returns
0L |
ObjectSizeEstimator |
getObjectSizeEstimator()
Return
null |
void |
setMaxChannelMemorySize(long maxChannelMemorySize)
Throws
UnsupportedOperationException as there is not support for limit the memory
size in this implementation |
void |
setObjectSizeEstimator(ObjectSizeEstimator objectSizeEstimator)
Throws
UnsupportedOperationException as there is not support for limit the memory
size in this implementation |
protected boolean |
shouldCount(java.lang.Runnable task)
Return
false as we not need to cound the memory in this implementation |
doExecute, getChildExecutorKey, getChildExecutorKeySet, newChildExecutorMap, removeChildExecutorbeforeExecute, decreaseCounter, doUnorderedExecute, getNotifyChannelFuturesOnShutdown, increaseCounter, remove, setNotifyChannelFuturesOnShutdown, shutdownNow, shutdownNow, terminatedafterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, toStringpublic OrderedDownstreamThreadPoolExecutor(int corePoolSize)
corePoolSize - the maximum number of active threadspublic OrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit)
corePoolSize - the maximum number of active threadskeepAliveTime - the amount of time for an inactive thread to shut itself downunit - the TimeUnit of keepAliveTimepublic OrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.ThreadFactory threadFactory)
corePoolSize - the maximum number of active threadskeepAliveTime - the amount of time for an inactive thread to shut itself downunit - the TimeUnit of keepAliveTimethreadFactory - the ThreadFactory of this poolpublic ObjectSizeEstimator getObjectSizeEstimator()
nullpublic void setObjectSizeEstimator(ObjectSizeEstimator objectSizeEstimator)
UnsupportedOperationException as there is not support for limit the memory
size in this implementationpublic long getMaxChannelMemorySize()
0Lpublic void setMaxChannelMemorySize(long maxChannelMemorySize)
UnsupportedOperationException as there is not support for limit the memory
size in this implementationpublic long getMaxTotalMemorySize()
0Lprotected boolean shouldCount(java.lang.Runnable task)
false as we not need to cound the memory in this implementationpublic void execute(java.lang.Runnable command)
execute 在接口中 java.util.concurrent.Executorexecute 在类中 MemoryAwareThreadPoolExecutorprotected java.util.concurrent.Executor getChildExecutor(ChannelEvent e)