public final class FairOrderedDownstreamThreadPoolExecutor extends FairOrderedMemoryAwareThreadPoolExecutor
OrderedDownstreamThreadPoolExecutor .
For more information about how the order is preserved
see FairOrderedMemoryAwareThreadPoolExecutor
FairOrderedMemoryAwareThreadPoolExecutor.EventTaskThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicymap| Constructor and Description |
|---|
FairOrderedDownstreamThreadPoolExecutor(int corePoolSize)
Creates a new instance.
|
FairOrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
TimeUnit unit)
Creates a new instance.
|
FairOrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
TimeUnit unit,
ThreadFactory threadFactory)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(Runnable task)
Executes the specified task concurrently while maintaining the event order.
|
void |
execute(Runnable command) |
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(Runnable task)
Return
false as we not need to count the memory in this implementation |
compareAndSetNext, getKey, newMap, removeKeybeforeExecute, 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, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic FairOrderedDownstreamThreadPoolExecutor(int corePoolSize)
corePoolSize - the maximum number of active threadspublic FairOrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
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 FairOrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
TimeUnit unit,
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()
nullgetObjectSizeEstimator in class MemoryAwareThreadPoolExecutorpublic void setObjectSizeEstimator(ObjectSizeEstimator objectSizeEstimator)
UnsupportedOperationException as there is not support for limit the memory size in this
implementationsetObjectSizeEstimator in class MemoryAwareThreadPoolExecutorpublic long getMaxChannelMemorySize()
0LgetMaxChannelMemorySize in class MemoryAwareThreadPoolExecutorpublic void setMaxChannelMemorySize(long maxChannelMemorySize)
UnsupportedOperationException as there is not support for limit the memory size in this
implementationsetMaxChannelMemorySize in class MemoryAwareThreadPoolExecutorpublic long getMaxTotalMemorySize()
0LgetMaxTotalMemorySize in class MemoryAwareThreadPoolExecutorprotected boolean shouldCount(Runnable task)
false as we not need to count the memory in this implementationshouldCount in class FairOrderedMemoryAwareThreadPoolExecutorpublic void execute(Runnable command)
execute in interface Executorexecute in class MemoryAwareThreadPoolExecutorprotected void doExecute(Runnable task)
doExecute in class FairOrderedMemoryAwareThreadPoolExecutorCopyright © 2008-2016 The Netty Project. All Rights Reserved.