Class TaskBatcher

org.elasticsearch.cluster.service.TaskBatcher

public abstract class TaskBatcher extends
Batching support for PrioritizedEsThreadPoolExecutor Tasks that share the same batching key are batched (see TaskBatcher.BatchedTask.batchingKey)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    Represents a runnable task that supports batching.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TaskBatcher​(org.apache.logging.log4j.Logger logger, PrioritizedEsThreadPoolExecutor threadExecutor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    <? extends TaskBatcher.BatchedTask> tasks, org.elasticsearch.core.TimeValue timeout)
    Action to be implemented by the specific batching implementation.
    protected abstract void
     batchingKey, <? extends TaskBatcher.BatchedTask> tasks,  tasksSummary)
    Action to be implemented by the specific batching implementation All tasks have the given batching key.
    void
    <? extends TaskBatcher.BatchedTask> tasks, org.elasticsearch.core.TimeValue timeout)
     

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

  • Method Details

    • submitTasks

      public void submitTasks(<? extends TaskBatcher.BatchedTask> tasks, @Nullable org.elasticsearch.core.TimeValue timeout) throws EsRejectedExecutionException
      Throws:
      EsRejectedExecutionException
    • onTimeout

      protected abstract void onTimeout(<? extends TaskBatcher.BatchedTask> tasks, org.elasticsearch.core.TimeValue timeout)
      Action to be implemented by the specific batching implementation. All tasks have the same batching key.
    • run

      protected abstract void run( batchingKey, <? extends TaskBatcher.BatchedTask> tasks,  tasksSummary)
      Action to be implemented by the specific batching implementation All tasks have the given batching key.