public final class FairOrderedDownstreamThreadPoolExecutor extends FairOrderedMemoryAwareThreadPoolExecutor
OrderedDownstreamThreadPoolExecutor
.
For more information about how the order is preserved
see FairOrderedMemoryAwareThreadPoolExecutor
FairOrderedMemoryAwareThreadPoolExecutor.EventTask
map
构造器和说明 |
---|
FairOrderedDownstreamThreadPoolExecutor(int corePoolSize)
Creates a new instance.
|
FairOrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit)
Creates a new instance.
|
FairOrderedDownstreamThreadPoolExecutor(int corePoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.ThreadFactory threadFactory)
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
doExecute(java.lang.Runnable task)
Executes the specified task concurrently while maintaining the event order.
|
void |
execute(java.lang.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(java.lang.Runnable task)
Return
false as we not need to count the memory in this implementation |
compareAndSetNext, getKey, newMap, removeKey
beforeExecute, decreaseCounter, doUnorderedExecute, getNotifyChannelFuturesOnShutdown, increaseCounter, remove, setNotifyChannelFuturesOnShutdown, shutdownNow, shutdownNow, terminated
afterExecute, 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, toString
public FairOrderedDownstreamThreadPoolExecutor(int corePoolSize)
corePoolSize
- the maximum number of active threadspublic FairOrderedDownstreamThreadPoolExecutor(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 keepAliveTime
public FairOrderedDownstreamThreadPoolExecutor(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 keepAliveTime
threadFactory
- the ThreadFactory
of this poolpublic ObjectSizeEstimator getObjectSizeEstimator()
null
public void setObjectSizeEstimator(ObjectSizeEstimator objectSizeEstimator)
UnsupportedOperationException
as there is not support for limit the memory size in this
implementationpublic long getMaxChannelMemorySize()
0L
public void setMaxChannelMemorySize(long maxChannelMemorySize)
UnsupportedOperationException
as there is not support for limit the memory size in this
implementationpublic long getMaxTotalMemorySize()
0L
protected boolean shouldCount(java.lang.Runnable task)
false
as we not need to count the memory in this implementationpublic void execute(java.lang.Runnable command)
execute
在接口中 java.util.concurrent.Executor
execute
在类中 MemoryAwareThreadPoolExecutor
protected void doExecute(java.lang.Runnable task)