Class QueueResizingEsThreadPoolExecutor
org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor
org.elasticsearch.common.util.concurrent.QueueResizingEsThreadPoolExecutor
- All Implemented Interfaces:
,
An extension to thread pool executor, which automatically adjusts the queue size of the
ResizableBlockingQueue
according to Little's Law.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor
EsThreadPoolExecutor.ShutdownListener
Nested classes/interfaces inherited from class java.util.concurrent.
, , ,
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
r, t)
protected void
sb)
Append details about this thread pool to the specified .int
Returns the current queue size (operations that are queued)double
Returns the exponentially weighted moving average of the task execution timeprotected
runnable)
protected
command)
Methods inherited from class org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor
execute, getTasks, terminated, toString
Methods inherited from class java.util.concurrent.
, , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Methods inherited from class java.util.concurrent.
, , , , , , , ,
Methods inherited from class java.lang.
, , , , , , , ,
-
Field Details
-
EWMA_ALPHA
public static double EWMA_ALPHA
-
-
Method Details
-
wrapRunnable
protected wrapRunnable( command)- Overrides:
wrapRunnable
in classEsThreadPoolExecutor
-
unwrap
protected unwrap( runnable)- Overrides:
unwrap
in classEsThreadPoolExecutor
-
getTaskExecutionEWMA
public double getTaskExecutionEWMA()Returns the exponentially weighted moving average of the task execution time -
getCurrentQueueSize
public int getCurrentQueueSize()Returns the current queue size (operations that are queued) -
afterExecute
protected void afterExecute( r, t)- Overrides:
afterExecute
in classEsThreadPoolExecutor
-
appendThreadPoolExecutorDetails
protected void appendThreadPoolExecutorDetails( sb)Description copied from class:EsThreadPoolExecutor
Append details about this thread pool to the specified . All details should be appended as key/value pairs in the form "%s = %s, "- Overrides:
appendThreadPoolExecutorDetails
in classEsThreadPoolExecutor
- Parameters:
sb
- the to append to
-