Class QueueResizingEsThreadPoolExecutor

org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor
org.elasticsearch.common.util.concurrent.QueueResizingEsThreadPoolExecutor
All Implemented Interfaces:
,

public final class QueueResizingEsThreadPoolExecutor extends EsThreadPoolExecutor
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

    Fields
    Modifier and Type
    Field
    Description
    static double
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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 time
    protected
     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 class EsThreadPoolExecutor
    • unwrap

      protected  unwrap( runnable)
      Overrides:
      unwrap in class EsThreadPoolExecutor
    • 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 class EsThreadPoolExecutor
    • 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 class EsThreadPoolExecutor
      Parameters:
      sb - the to append to