Class ForwardingQueryProcessingPool

java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.util.concurrent.ForwardingExecutorService
com.google.common.util.concurrent.ForwardingListeningExecutorService
org.apache.druid.query.ForwardingQueryProcessingPool
All Implemented Interfaces:
com.google.common.util.concurrent.ListeningExecutorService, Executor, ExecutorService, QueryProcessingPool
Direct Known Subclasses:
MetricsEmittingQueryProcessingPool

public class ForwardingQueryProcessingPool extends com.google.common.util.concurrent.ForwardingListeningExecutorService implements QueryProcessingPool
Default implementation of QueryProcessingPool that just forwards operations, including query execution tasks, to an underlying ExecutorService Exposes a method submitRunnerTask(PrioritizedQueryRunnerCallable, long, TimeUnit) which allows execution tasks to be serviced a custom timeout.
  • Constructor Details

  • Method Details

    • submitRunnerTask

      public <T, V> com.google.common.util.concurrent.ListenableFuture<T> submitRunnerTask(PrioritizedQueryRunnerCallable<T,V> task)
      Description copied from interface: QueryProcessingPool
      Submits the query execution unit task for asynchronous execution.
      Specified by:
      submitRunnerTask in interface QueryProcessingPool
      Type Parameters:
      T - - Task result type
      V - - Query runner sequence type
      Parameters:
      task - - Task to be submitted.
      Returns:
      - Future object for tracking the task completion.
    • submitRunnerTask

      public <T, V> com.google.common.util.concurrent.ListenableFuture<T> submitRunnerTask(PrioritizedQueryRunnerCallable<T,V> task, long timeout, TimeUnit unit)
      Description copied from interface: QueryProcessingPool
      Submits the query execution task for asynchronous execution, with a provided timeout.
      Specified by:
      submitRunnerTask in interface QueryProcessingPool
      Type Parameters:
      T - - Task result type
      V - - Query runner sequence type
      Parameters:
      task - - Task to be submitted.
      timeout - - Timeout value
      unit - - Timeout unit
      Returns:
      - Future object for tracking the task completion.
    • delegate

      protected com.google.common.util.concurrent.ListeningExecutorService delegate()
      Specified by:
      delegate in class com.google.common.util.concurrent.ForwardingListeningExecutorService
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface ExecutorService
      Overrides:
      shutdown in class com.google.common.util.concurrent.ForwardingExecutorService