public final class QueueResizingEsThreadPoolExecutor extends EsThreadPoolExecutor
ResizableBlockingQueue
according to Little's Law.EsThreadPoolExecutor.ShutdownListener
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
Modifier and Type | Field and Description |
---|---|
static double |
EWMA_ALPHA |
name
Modifier and Type | Method and Description |
---|---|
protected void |
afterExecute(java.lang.Runnable r,
java.lang.Throwable t) |
protected void |
doExecute(java.lang.Runnable command) |
int |
getCurrentCapacity()
Returns the current queue capacity
|
int |
getCurrentQueueSize()
Returns the current queue size (operations that are queued)
|
double |
getTaskExecutionEWMA()
Returns the exponentially weighted moving average of the task execution time
|
java.lang.String |
toString() |
execute, getTasks, shutdown, terminated, unwrap, wrapRunnable
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow
protected void doExecute(java.lang.Runnable command)
doExecute
in class EsThreadPoolExecutor
public int getCurrentCapacity()
public double getTaskExecutionEWMA()
public int getCurrentQueueSize()
protected void afterExecute(java.lang.Runnable r, java.lang.Throwable t)
afterExecute
in class EsThreadPoolExecutor
public java.lang.String toString()
toString
in class EsThreadPoolExecutor